Compare commits
607
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eba38b8900 | ||
|
|
40b034f5b8 | ||
|
|
6195f229b6 | ||
|
|
57917049ee | ||
|
|
5e18ad05f4 | ||
|
|
d01023aaac | ||
|
|
13f7c918b8 | ||
|
|
87d4311614 | ||
|
|
9446629b73 | ||
|
|
55a7a458e3 | ||
|
|
9689ffc485 | ||
|
|
4c50a8f8fb | ||
|
|
639695b37d | ||
|
|
4c3f28eb0e | ||
|
|
5f064519d5 | ||
|
|
6f19b4c052 | ||
|
|
946ca23f51 | ||
|
|
07661c6ca2 | ||
|
|
4738d62e1c | ||
|
|
4b1b4e1f78 | ||
|
|
6a70b17582 | ||
|
|
2a76f24b14 | ||
|
|
7192ed9236 | ||
|
|
34348d9ee4 | ||
|
|
bf6b477994 | ||
|
|
2bda5ac2e1 | ||
|
|
665c4ae0cf | ||
|
|
d5243a5231 | ||
|
|
de8b2d4a6a | ||
|
|
a39f1fae0b | ||
|
|
8f64928e2e | ||
|
|
8c2a8ca509 | ||
|
|
acae423ef4 | ||
|
|
260d30edc0 | ||
|
|
1702187676 | ||
|
|
a8067ebf5e | ||
|
|
bf39e98daf | ||
|
|
87840b3477 | ||
|
|
3bd0ed80a4 | ||
|
|
4c15bbfb50 | ||
|
|
267758962c | ||
|
|
212e126fb8 | ||
|
|
47816f0ff5 | ||
|
|
46d6ca8690 | ||
|
|
e818eefc01 | ||
|
|
28e054c36c | ||
|
|
fac4fe3d40 | ||
|
|
78bb82abd3 | ||
|
|
2019d4d64c | ||
|
|
20c29a251a | ||
|
|
434fcb5f1e | ||
|
|
66382ccd4b | ||
|
|
333ce68d35 | ||
|
|
3ea7b86492 | ||
|
|
d50b1ecd9c | ||
|
|
57a00e7b6b | ||
|
|
33cdef544d | ||
|
|
8a2a43b742 | ||
|
|
e7e85d37b6 | ||
|
|
abd00c4d4e | ||
|
|
8d2790af06 | ||
|
|
2274fd37e9 | ||
|
|
29e647276e | ||
|
|
9bc1bbe5d8 | ||
|
|
72d68be601 | ||
|
|
53f24cb0d9 | ||
|
|
55c47c7cdf | ||
|
|
4fd2677873 | ||
|
|
722b485b96 | ||
|
|
3854e59770 | ||
|
|
495d4153ad | ||
|
|
2321e203ec | ||
|
|
6244ca6c01 | ||
|
|
d3a962db1e | ||
|
|
5a090dd203 | ||
|
|
bd3ffce696 | ||
|
|
4b955e8257 | ||
|
|
7f13206216 | ||
|
|
95797f740b | ||
|
|
37ad2d4de3 | ||
|
|
060dd0a372 | ||
|
|
a43c7af389 | ||
|
|
9e89c1f898 | ||
|
|
4b3de5696f | ||
|
|
0ca3e23b38 | ||
|
|
5ebf7adae6 | ||
|
|
336352654d | ||
|
|
6add72bafd | ||
|
|
01d9eb4070 | ||
|
|
0a20176ca6 | ||
|
|
a2fb64caf1 | ||
|
|
f59dbd2976 | ||
|
|
8376f819a5 | ||
|
|
10184612be | ||
|
|
943d47bc21 | ||
|
|
1da4546b2c | ||
|
|
f79c9b1e3d | ||
|
|
f929f5023c | ||
|
|
108aff1c82 | ||
|
|
1fe2d7b97a | ||
|
|
6c7096aa34 | ||
|
|
607e42b560 | ||
|
|
33001ca556 | ||
|
|
a6afd50cb9 | ||
|
|
011626d048 | ||
|
|
43baca1fce | ||
|
|
326d40ab08 | ||
|
|
13636ac3b0 | ||
|
|
a4890ac802 | ||
|
|
cee2dcef9f | ||
|
|
135b0797fb | ||
|
|
7b12906ac0 | ||
|
|
205c6ed5cc | ||
|
|
af021f136e | ||
|
|
dda175e108 | ||
|
|
cd79df85a2 | ||
|
|
342a0dd0e5 | ||
|
|
03b79f9799 | ||
|
|
19d30c0b49 | ||
|
|
dd54a08163 | ||
|
|
e5acb97c8a | ||
|
|
26cf678ea3 | ||
|
|
0cc8758724 | ||
|
|
0afe7749f0 | ||
|
|
7dad677ef8 | ||
|
|
f0ebe6cbe4 | ||
|
|
77bc4e27f1 | ||
|
|
aa1cf3c606 | ||
|
|
be8dfc7421 | ||
|
|
4e597364a6 | ||
|
|
f1906e8ea3 | ||
|
|
f7a77ff295 | ||
|
|
d48fa83230 | ||
|
|
dc5c53b23a | ||
|
|
4c5c91f36d | ||
|
|
73f9d372f6 | ||
|
|
0828d9c6db | ||
|
|
57272bfb60 | ||
|
|
09b61926d8 | ||
|
|
7a8058b988 | ||
|
|
409a62c54c | ||
|
|
e947cdfd27 | ||
|
|
cad88c5906 | ||
|
|
79fa438d45 | ||
|
|
27e4da57f8 | ||
|
|
f0d8bf4d44 | ||
|
|
a8c13ba73f | ||
|
|
36221e6447 | ||
|
|
f9040e06f4 | ||
|
|
eb06423b7e | ||
|
|
6f68240d9b | ||
|
|
665122be0d | ||
|
|
d843d2650c | ||
|
|
67b001b190 | ||
|
|
fdbece6840 | ||
|
|
e511187ebd | ||
|
|
c923e3cef8 | ||
|
|
3bc84a8f0a | ||
|
|
084f6b291f | ||
|
|
1e93d92efd | ||
|
|
184ca9b537 | ||
|
|
f6922575a0 | ||
|
|
8597220def | ||
|
|
b6b167ea22 | ||
|
|
bf56162b49 | ||
|
|
443f8e4413 | ||
|
|
94883bbe6b | ||
|
|
4b9cdf8098 | ||
|
|
32d916d96a | ||
|
|
de41f66579 | ||
|
|
1d92178bec | ||
|
|
235e6e481c | ||
|
|
aa9866c390 | ||
|
|
5fd2cc8472 | ||
|
|
2e8a927912 | ||
|
|
631cb464c1 | ||
|
|
c8e7c8c928 | ||
|
|
3442c69911 | ||
|
|
5bae3985a3 | ||
|
|
bf6133ea61 | ||
|
|
7663d07513 | ||
|
|
8cdad8fec2 | ||
|
|
5c73b97715 | ||
|
|
cf306bf345 | ||
|
|
032ede1165 | ||
|
|
34cf4336ac | ||
|
|
631bb6bfea | ||
|
|
06eb0a4367 | ||
|
|
fb255668fa | ||
|
|
f72c687fa2 | ||
|
|
5b84b2cd0b | ||
|
|
3b367ef3cb | ||
|
|
0c6592ab4d | ||
|
|
d653989a1e | ||
|
|
dffc58208f | ||
|
|
81408256d3 | ||
|
|
ed96dc5dcb | ||
|
|
d075b25b63 | ||
|
|
8bb42d7812 | ||
|
|
aaab84019c | ||
|
|
3266d3c4da | ||
|
|
dd960811a4 | ||
|
|
58cc1ee718 | ||
|
|
7632a672b9 | ||
|
|
e9d9790948 | ||
|
|
6750780e88 | ||
|
|
bb5648f9d9 | ||
|
|
a5b3fc2348 | ||
|
|
e4f7d6c418 | ||
|
|
5a31a22986 | ||
|
|
24f7bc252d | ||
|
|
c2515e8e20 | ||
|
|
8858947237 | ||
|
|
36e2175bd3 | ||
|
|
9b96944bae | ||
|
|
b9f577eb6a | ||
|
|
11a4845c7d | ||
|
|
d8de90f859 | ||
|
|
5c9106da2c | ||
|
|
3ddb8337b3 | ||
|
|
3db9f56718 | ||
|
|
8a929b14f1 | ||
|
|
c9a7169068 | ||
|
|
7d2f6603cf | ||
|
|
14f22d9040 | ||
|
|
cc9ece19e3 | ||
|
|
b63c545f59 | ||
|
|
84527eb4d5 | ||
|
|
94740dc46a | ||
|
|
c8c74d8b3e | ||
|
|
4892b52156 | ||
|
|
074cc75aa7 | ||
|
|
c116fb963a | ||
|
|
e402955133 | ||
|
|
2c7c3b79bd | ||
|
|
51286ec006 | ||
|
|
f6ff0216c8 | ||
|
|
158e3187a3 | ||
|
|
0c6c59a289 | ||
|
|
b865b66094 | ||
|
|
8d532c111b | ||
|
|
7d9e19b5eb | ||
|
|
c73912278b | ||
|
|
a1322f019e | ||
|
|
bb2c242c39 | ||
|
|
0e9a8da68c | ||
|
|
1360a1fa1a | ||
|
|
040e132f16 | ||
|
|
9f81119c02 | ||
|
|
575cbf3ea1 | ||
|
|
4a97a37eae | ||
|
|
0905a87ed7 | ||
|
|
d0dadf5ac4 | ||
|
|
498ea71f99 | ||
|
|
c1c10ca2b9 | ||
|
|
debf6c2853 | ||
|
|
11cce88a41 | ||
|
|
0768775dc1 | ||
|
|
8fbd61343a | ||
|
|
9827b8ade9 | ||
|
|
68c573013e | ||
|
|
b9e16f3475 | ||
|
|
b644eb672b | ||
|
|
5641664f91 | ||
|
|
d9fe816644 | ||
|
|
99fcbcf904 | ||
|
|
ddee74194c | ||
|
|
3b302c58e2 | ||
|
|
7aecb8b1fd | ||
|
|
4e01cc3cfc | ||
|
|
aab3fcbd1c | ||
|
|
da49d1cfc3 | ||
|
|
637e3c4c4b | ||
|
|
587c81ac99 | ||
|
|
243cded414 | ||
|
|
7c9b45839d | ||
|
|
4fa777e7a1 | ||
|
|
2e527c6bc1 | ||
|
|
dc909bd1dd | ||
|
|
4139f9c467 | ||
|
|
c5f85f808c | ||
|
|
487ca41b5c | ||
|
|
90b0f710a6 | ||
|
|
e5e1957a8f | ||
|
|
1d33b62405 | ||
|
|
dc49ce1cd0 | ||
|
|
739b3ba0eb | ||
|
|
c47a301c0c | ||
|
|
5a8dfccee3 | ||
|
|
940a0f2003 | ||
|
|
0a9422771c | ||
|
|
f0004e120d | ||
|
|
ccac107ded | ||
|
|
4731ee6ae1 | ||
|
|
aa6dc21ad6 | ||
|
|
ed232e96d1 | ||
|
|
4894e9e65a | ||
|
|
960a3906fe | ||
|
|
4b091135fe | ||
|
|
913c62979e | ||
|
|
f8dc30d18b | ||
|
|
b630c8255a | ||
|
|
aaf433f2f9 | ||
|
|
ab80e26381 | ||
|
|
7df65ab9ca | ||
|
|
e1f49ba977 | ||
|
|
c7c99d81c5 | ||
|
|
ca391cd085 | ||
|
|
28560fd280 | ||
|
|
f492efe680 | ||
|
|
4a202abdc8 | ||
|
|
fc9e2a1a75 | ||
|
|
47ade1ec01 | ||
|
|
948104ee5a | ||
|
|
337c87faad | ||
|
|
4344a7e599 | ||
|
|
08fa20bf54 | ||
|
|
62a1054fd0 | ||
|
|
1fa08d78d3 | ||
|
|
0c384a76cd | ||
|
|
7f2a3a7c5f | ||
|
|
8bb758633d | ||
|
|
39ba7ff3ce | ||
|
|
72fbbd0a29 | ||
|
|
08a39b1073 | ||
|
|
80968572b4 | ||
|
|
3c4a118978 | ||
|
|
952386d00f | ||
|
|
55ce0cbfdb | ||
|
|
be4822fafd | ||
|
|
8b3c175d95 | ||
|
|
1a28a4a138 | ||
|
|
232a2004ba | ||
|
|
a74acbfd82 | ||
|
|
98c431e5ba | ||
|
|
8d698288fb | ||
|
|
28ca65c663 | ||
|
|
c0a3c48802 | ||
|
|
e00427f26a | ||
|
|
12f2ea418c | ||
|
|
0c8eaf096f | ||
|
|
f3be313bbe | ||
|
|
6c4b8ee8ee | ||
|
|
6bc28265d3 | ||
|
|
af1c5ef613 | ||
|
|
d4b800e3c1 | ||
|
|
156195dac6 | ||
|
|
137cc98dc9 | ||
|
|
d47dd94620 | ||
|
|
1028731f03 | ||
|
|
889175eb17 | ||
|
|
50d7e0b4ef | ||
|
|
473f3d077f | ||
|
|
6c73f8d681 | ||
|
|
1b9bc18ab6 | ||
|
|
01bbb308b4 | ||
|
|
f2413e0e6a | ||
|
|
2386be289c | ||
|
|
fb68ed9adf | ||
|
|
78a94766d7 | ||
|
|
9114623d2b | ||
|
|
e254e95d7d | ||
|
|
17e35dd6c2 | ||
|
|
b407e80d00 | ||
|
|
e0824ab0d0 | ||
|
|
cd7b0f36f7 | ||
|
|
799708f50d | ||
|
|
58314571ef | ||
|
|
8841456764 | ||
|
|
2d7235e1f1 | ||
|
|
2ed9c1f816 | ||
|
|
b1318ccac7 | ||
|
|
731f27e77e | ||
|
|
a37f21fdcf | ||
|
|
9557e2f454 | ||
|
|
3458eb05a8 | ||
|
|
3f7d2b0036 | ||
|
|
bf0a1644d7 | ||
|
|
68dfb55f18 | ||
|
|
bf23e17e7c | ||
|
|
d196b5e493 | ||
|
|
11cbb0619d | ||
|
|
026817bd9c | ||
|
|
26da376f31 | ||
|
|
2ed9b06ab8 | ||
|
|
6295b44ed6 | ||
|
|
707f0f3ce0 | ||
|
|
49cfe448da | ||
|
|
3a8eff4589 | ||
|
|
f919fb6e0e | ||
|
|
ab76e6a8b7 | ||
|
|
e938089e20 | ||
|
|
2ba04b17a8 | ||
|
|
e0b408a5ee | ||
|
|
0f2b87f0ae | ||
|
|
684083a3da | ||
|
|
4e0f18fc0f | ||
|
|
f16ad8f1d6 | ||
|
|
9bc895c9d9 | ||
|
|
b48f406b91 | ||
|
|
8c767607fb | ||
|
|
e6118469ad | ||
|
|
ddeac8f5cd | ||
|
|
da0145f938 | ||
|
|
bcd2c7fa85 | ||
|
|
01e5303b46 | ||
|
|
9eed71a449 | ||
|
|
1831a14c27 | ||
|
|
b6707b7ffb | ||
|
|
d4f775178c | ||
|
|
c93d311f39 | ||
|
|
aaa0c38cf0 | ||
|
|
a803504c72 | ||
|
|
a7d46b6a64 | ||
|
|
6182b13c41 | ||
|
|
6069ee839d | ||
|
|
f5352eae1e | ||
|
|
15de58c441 | ||
|
|
dbdf383fcd | ||
|
|
436d987224 | ||
|
|
c803e6ee1d | ||
|
|
5334c3a6cf | ||
|
|
4506ec30fe | ||
|
|
064966f7fb | ||
|
|
6040d4e9c2 | ||
|
|
ffc1bd97a8 | ||
|
|
13aa5ae73c | ||
|
|
c0e0ef8573 | ||
|
|
69b892edc7 | ||
|
|
caac5988d8 | ||
|
|
f2b40a2b6c | ||
|
|
886eb41ac4 | ||
|
|
da13efce9d | ||
|
|
6aaaea3e61 | ||
|
|
7ba2676176 | ||
|
|
cf3bc94608 | ||
|
|
ff466ef5aa | ||
|
|
2ac235d08c | ||
|
|
c5e86b2f3d | ||
|
|
e975371c4d | ||
|
|
726f335c37 | ||
|
|
65640c6743 | ||
|
|
802b551d42 | ||
|
|
2f4c3cf019 | ||
|
|
b85a5b0dcd | ||
|
|
2b0e2bc920 | ||
|
|
dd29de6f19 | ||
|
|
0b6ecdf509 | ||
|
|
fbd563baea | ||
|
|
f533ab528d | ||
|
|
099883e2b1 | ||
|
|
a9a626e440 | ||
|
|
838b502f69 | ||
|
|
1ebdcd4c34 | ||
|
|
65efb52541 | ||
|
|
3194c0a8cd | ||
|
|
660010f978 | ||
|
|
2be370b68c | ||
|
|
f14f70833f | ||
|
|
3aafdbf160 | ||
|
|
5b4905d428 | ||
|
|
e409b8c698 | ||
|
|
b6574c57c6 | ||
|
|
ccf915f7e4 | ||
|
|
c97bc67ce2 | ||
|
|
2996e72d91 | ||
|
|
0dd74f2f86 | ||
|
|
cb355b8adc | ||
|
|
57d0ad450a | ||
|
|
c0d92d4190 | ||
|
|
e8ca9303c7 | ||
|
|
0f5aeea233 | ||
|
|
be60437b16 | ||
|
|
901adb154b | ||
|
|
961a77fb99 | ||
|
|
0298133676 | ||
|
|
f2ca287330 | ||
|
|
83544b0bdf | ||
|
|
df3b061c99 | ||
|
|
0bd7e3de57 | ||
|
|
107fd6758d | ||
|
|
54a3d2ac63 | ||
|
|
03f2cc49e3 | ||
|
|
173827f78d | ||
|
|
ffc56a4bf3 | ||
|
|
ab5a68b3b1 | ||
|
|
58812a4641 | ||
|
|
0c738a5673 | ||
|
|
c8d522dd36 | ||
|
|
6b50da7ba8 | ||
|
|
8da45fcab7 | ||
|
|
760e336e89 | ||
|
|
7d2451460d | ||
|
|
181c5442b9 | ||
|
|
af5a051e4d | ||
|
|
c9e712e528 | ||
|
|
22c0f129ae | ||
|
|
2dcc521b29 | ||
|
|
4c8112ec01 | ||
|
|
b0745fb156 | ||
|
|
dc05021a4b | ||
|
|
9000f73ba3 | ||
|
|
9e978d7416 | ||
|
|
ba263b5b7e | ||
|
|
ecc40b18e6 | ||
|
|
ebe63fd316 | ||
|
|
52784fc3cc | ||
|
|
2079e44fb9 | ||
|
|
62819dcfba | ||
|
|
29601a6e7e | ||
|
|
c5b54803cd | ||
|
|
2f8b28efad | ||
|
|
baa5811623 | ||
|
|
6aa63d9349 | ||
|
|
d894b2da79 | ||
|
|
c576cb2ff6 | ||
|
|
f1224b4af1 | ||
|
|
7eb962ee14 | ||
|
|
12a266211e | ||
|
|
9d15323e24 | ||
|
|
76983d693e | ||
|
|
2db31ececa | ||
|
|
4b9d115e35 | ||
|
|
93efc4724f | ||
|
|
0dd034d66b | ||
|
|
31a974bc05 | ||
|
|
96f621bbef | ||
|
|
45f99ab755 | ||
|
|
ec6bb32c6a | ||
|
|
8e1cc95c94 | ||
|
|
67401ba29c | ||
|
|
0768f54fd2 | ||
|
|
9f15b9d80a | ||
|
|
cc35795b07 | ||
|
|
636e435e11 | ||
|
|
f4bea4002a | ||
|
|
f59644a145 | ||
|
|
f21e5369a5 | ||
|
|
dea184741e | ||
|
|
6690b9e5a3 | ||
|
|
131e26e671 | ||
|
|
1a69df0211 | ||
|
|
00bc5bf6bd | ||
|
|
b549996d58 | ||
|
|
31dba79733 | ||
|
|
a437c42521 | ||
|
|
6ee7fd95e7 | ||
|
|
a037959ae3 | ||
|
|
e646307f91 | ||
|
|
3b6346b5a3 | ||
|
|
375df38a4a | ||
|
|
e93e971fea | ||
|
|
67816c747d | ||
|
|
9b0a277490 | ||
|
|
c4cc5c3836 | ||
|
|
dc59f82011 | ||
|
|
f735b3c61b | ||
|
|
332e0bc3c2 | ||
|
|
78619cc129 | ||
|
|
bf299d5ee1 | ||
|
|
39f3fefc74 | ||
|
|
a7fb84e783 | ||
|
|
d1d42ef30d | ||
|
|
9674fdcbfb | ||
|
|
829a61d5e0 | ||
|
|
e3a812507f | ||
|
|
7b082d031a | ||
|
|
6baa5c8fb0 | ||
|
|
ef28ac9b9c | ||
|
|
45c5968fc1 | ||
|
|
149aa691a6 | ||
|
|
21522d3e1d | ||
|
|
e55a09c10b | ||
|
|
9e204a3376 | ||
|
|
98f3820d4b | ||
|
|
1828ba389d | ||
|
|
247336ec29 | ||
|
|
169b5ee36f | ||
|
|
df57c4b74b | ||
|
|
36a0bf14e9 | ||
|
|
d56d6db639 | ||
|
|
a586ae7793 | ||
|
|
8b3f08c9ea | ||
|
|
bc9ca361ad | ||
|
|
924c26ba3d | ||
|
|
3cfe2e0fa7 | ||
|
|
2b1e14acbf | ||
|
|
f5260a8535 | ||
|
|
b4df4ff044 | ||
|
|
40e1234ac4 | ||
|
|
052e68f3b2 | ||
|
|
32d48b8290 | ||
|
|
975f09f79a | ||
|
|
08d160ae27 | ||
|
|
08bc58ca7a | ||
|
|
405631c9d8 | ||
|
|
c635b31756 | ||
|
|
d9849bb589 | ||
|
|
f8453f45f7 | ||
|
|
2b91689473 | ||
|
|
6468892106 | ||
|
|
2b5cb47cfd | ||
|
|
401c6476dd | ||
|
|
56e54fb695 | ||
|
|
0d43513009 | ||
|
|
8ee0bbc4b9 | ||
|
|
c7766cee64 |
@@ -1,3 +1,5 @@
|
||||
*.sln.in eol=crlf
|
||||
*.vcxproj.in eol=crlf
|
||||
*.vcxproj.filters.in eol=crlf
|
||||
*.dsw eol=crlf
|
||||
win32utils/**.txt eol=crlf
|
||||
|
||||
+1
-30
@@ -22,38 +22,9 @@ lwresd.run
|
||||
named.run
|
||||
named.memstats
|
||||
gen.dSYM/
|
||||
.libs/
|
||||
.deps/
|
||||
.dirstamp
|
||||
unit/atf-src/atf-c++/atf-c++.pc
|
||||
unit/atf-src/atf-c/atf-c.pc
|
||||
unit/atf-src/atf-c/defs.h
|
||||
unit/atf-src/atf-c/detail/process_helpers
|
||||
unit/atf-src/atf-config/atf-config
|
||||
unit/atf-src/atf-report/atf-report
|
||||
unit/atf-src/atf-report/fail_helper
|
||||
unit/atf-src/atf-report/misc_helpers
|
||||
unit/atf-src/atf-report/pass_helper
|
||||
unit/atf-src/atf-run/atf-run
|
||||
unit/atf-src/atf-run/bad_metadata_helper
|
||||
unit/atf-src/atf-run/expect_helpers
|
||||
unit/atf-src/atf-run/misc_helpers
|
||||
unit/atf-src/atf-run/pass_helper
|
||||
unit/atf-src/atf-run/several_tcs_helper
|
||||
unit/atf-src/atf-run/zero_tcs_helper
|
||||
unit/atf-src/atf-sh/atf-check
|
||||
unit/atf-src/atf-sh/atf-sh
|
||||
unit/atf-src/atf-sh/misc_helpers
|
||||
unit/atf-src/atf-version/atf-version
|
||||
unit/atf-src/atf-version/revision.h
|
||||
unit/atf-src/atf-version/revision.h.stamp
|
||||
unit/atf-src/bconfig.h
|
||||
unit/atf-src/bootstrap/atconfig
|
||||
unit/atf-src/doc/atf.7
|
||||
unit/atf-src/stamp-h1
|
||||
unit/atf-src/test-programs/c_helpers
|
||||
unit/atf-src/test-programs/cpp_helpers
|
||||
unit/atf-src/test-programs/sh_helpers
|
||||
.libs/
|
||||
# ccc-analyzer store its results in .plist directories
|
||||
*.plist/
|
||||
*~
|
||||
|
||||
+389
-169
@@ -1,167 +1,164 @@
|
||||
variables:
|
||||
# Not normally needed, but may be if some script uses `apt-get install`.
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
# Locale settings do not affect the build, but might affect tests.
|
||||
LC_ALL: C
|
||||
DOCKER_DRIVER: overlay2
|
||||
CI_REGISTRY_IMAGE: oerdnj/bind9
|
||||
|
||||
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
|
||||
CCACHE_DIR: "/ccache"
|
||||
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
|
||||
|
||||
stages:
|
||||
- precheck
|
||||
- build
|
||||
- test
|
||||
- push
|
||||
|
||||
### Runner Tag Templates
|
||||
|
||||
.linux-amd64: &linux_amd64
|
||||
tags:
|
||||
- linux
|
||||
- amd64
|
||||
|
||||
.linux-i386: &linux_i386
|
||||
tags:
|
||||
- linux
|
||||
- i386
|
||||
|
||||
### Docker Image Templates
|
||||
|
||||
# CentOS
|
||||
|
||||
.centos-centos6-amd64: ¢os_centos6_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
<<: *linux_amd64
|
||||
|
||||
.centos-centos7-amd64: ¢os_centos7_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
<<: *linux_amd64
|
||||
|
||||
# Debian
|
||||
|
||||
.debian-jessie-amd64: &debian_jessie_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
<<: *linux_amd64
|
||||
|
||||
.debian-jessie-i386: &debian_jessie_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
<<: *linux_i386
|
||||
|
||||
.debian-stretch-amd64: &debian_stretch_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
<<: *linux_amd64
|
||||
|
||||
.debian-stretch-i386:: &debian_stretch_i386_image
|
||||
.debian-stretch-i386: &debian_stretch_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
|
||||
.debian-buster-amd64: &debian_buster_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.debian-buster-i386:: &debian_buster_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
<<: *linux_i386
|
||||
|
||||
.debian-sid-amd64: &debian_sid_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
<<: *linux_amd64
|
||||
|
||||
.debian-sid-i386: &debian_sid_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
<<: *linux_i386
|
||||
|
||||
.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
# Fedora
|
||||
|
||||
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
.fedora-29-amd64: &fedora_29_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:fedora-29-amd64"
|
||||
<<: *linux_amd64
|
||||
|
||||
# Ubuntu
|
||||
|
||||
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
<<: *linux_amd64
|
||||
|
||||
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
<<: *linux_i386
|
||||
|
||||
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
|
||||
<<: *linux_amd64
|
||||
|
||||
.ubuntu-bionic-i386: &ubuntu_bionic_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
|
||||
<<: *linux_i386
|
||||
|
||||
### Job Templates
|
||||
|
||||
.default-triggering-rules: &default_triggering_rules
|
||||
only:
|
||||
- merge_requests
|
||||
- tags
|
||||
- web
|
||||
|
||||
.precheck: &precheck_job
|
||||
<<: *default_triggering_rules
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: precheck
|
||||
|
||||
.build: &build_job
|
||||
<<: *default_triggering_rules
|
||||
stage: build
|
||||
before_script:
|
||||
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
|
||||
- autoreconf -fi
|
||||
script:
|
||||
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr --with-libidn2 --prefix=$HOME/.local --without-make-clean "${EXTRA_CONFIGURE}" || cat config.log
|
||||
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
|
||||
- ./configure --enable-developer --with-randomdev=/dev/urandom --with-libtool --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:
|
||||
expire_in: '1 hour'
|
||||
untracked: true
|
||||
|
||||
.install_test: &install_test_job
|
||||
stage: test
|
||||
before_script:
|
||||
- mkdir $HOME/.local
|
||||
script:
|
||||
- make install
|
||||
expire_in: "1 hour"
|
||||
|
||||
.system_test: &system_test_job
|
||||
<<: *default_triggering_rules
|
||||
stage: test
|
||||
retry: 2
|
||||
before_script:
|
||||
- rm -rf .ccache
|
||||
- bash -x bin/tests/system/ifconfig.sh up
|
||||
- bash -x util/prepare-softhsm2.sh
|
||||
script:
|
||||
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
|
||||
- test -s bin/tests/system/systests.output
|
||||
artifacts:
|
||||
untracked: true
|
||||
expire_in: '1 week'
|
||||
expire_in: "1 week"
|
||||
when: on_failure
|
||||
|
||||
.unit_test: &unit_test_job
|
||||
<<: *default_triggering_rules
|
||||
stage: test
|
||||
before_script:
|
||||
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
|
||||
- bash -x util/prepare-softhsm2.sh
|
||||
script:
|
||||
- make unit
|
||||
after_script:
|
||||
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
|
||||
artifacts:
|
||||
paths:
|
||||
- atf.out
|
||||
- kyua.log
|
||||
- kyua.results
|
||||
- kyua_html/
|
||||
expire_in: '1 week'
|
||||
- kyua.log
|
||||
- kyua.results
|
||||
- kyua_html/
|
||||
expire_in: "1 week"
|
||||
when: on_failure
|
||||
|
||||
precheck:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: precheck
|
||||
### Job Definitions
|
||||
|
||||
# Jobs in the precheck stage
|
||||
|
||||
misc:sid:amd64:
|
||||
<<: *precheck_job
|
||||
script:
|
||||
- sh util/check-ans-prereq.sh
|
||||
- sh util/checklibs.sh > checklibs.out
|
||||
- sh util/tabify-changes < CHANGES > CHANGES.tmp
|
||||
- diff -urNap CHANGES CHANGES.tmp
|
||||
- rm CHANGES.tmp
|
||||
- perl util/check-changes CHANGES
|
||||
- perl -w util/merge_copyrights
|
||||
- diff -urNap util/copyrights util/newcopyrights
|
||||
@@ -172,108 +169,331 @@ precheck:debian:sid:amd64:
|
||||
- xmllint --noout --nonet --html `git ls-files '*.html'`
|
||||
artifacts:
|
||||
paths:
|
||||
- util/newcopyrights
|
||||
- checklibs.out
|
||||
expire_in: '1 week'
|
||||
- util/newcopyrights
|
||||
- checklibs.out
|
||||
expire_in: "1 week"
|
||||
when: on_failure
|
||||
|
||||
#build:debian:jessie:amd64:
|
||||
# <<: *debian_jessie_amd64_image
|
||||
# <<: *build_job
|
||||
#
|
||||
#build:debian:jessie:i386:
|
||||
# <<: *debian_jessie_i386_image
|
||||
# <<: *build_job
|
||||
#
|
||||
#build:debian:stretch:amd64:
|
||||
# <<: *debian_stretch_amd64_image
|
||||
# <<: *build_job
|
||||
#
|
||||
#build:debian:buster:i386:
|
||||
# <<: *debian_buster_i386_image
|
||||
# <<: *build_job
|
||||
#
|
||||
#build:ubuntu:trusty:amd64:
|
||||
# <<: *ubuntu_trusty_amd64_image
|
||||
# <<: *build_job
|
||||
#
|
||||
#build:ubuntu:xenial:i386:
|
||||
# <<: *ubuntu_xenial_i386_image
|
||||
# <<: *build_job
|
||||
🐞:sid:amd64:
|
||||
<<: *precheck_job
|
||||
script: util/check-cocci
|
||||
|
||||
build:centos:centos6:amd64:
|
||||
# Jobs for doc builds on Debian Sid (amd64)
|
||||
|
||||
docs:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: build
|
||||
script:
|
||||
- ./configure || cat config.log
|
||||
- make -C doc/misc docbook
|
||||
- make -C doc/arm Bv9ARM.html
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/arm/
|
||||
expire_in: "1 month"
|
||||
only:
|
||||
- merge_requests
|
||||
- tags
|
||||
- web
|
||||
- master@isc-projects/bind9
|
||||
- /^v9_[1-9][0-9]$/@isc-projects/bind9
|
||||
|
||||
push:docs:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: push
|
||||
dependencies: []
|
||||
script:
|
||||
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
|
||||
only:
|
||||
- master@isc-projects/bind9
|
||||
- /^v9_[1-9][0-9]$/@isc-projects/bind9
|
||||
|
||||
# Jobs for regular GCC builds on CentOS 6 (amd64)
|
||||
|
||||
gcc:centos6:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--disable-warn-error"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:centos:centos7:amd64:
|
||||
system:gcc:centos6:amd64:
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:centos6:amd64
|
||||
|
||||
unit:gcc:centos6:amd64:
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:centos6:amd64
|
||||
|
||||
# Jobs for regular GCC builds on CentOS 7 (amd64)
|
||||
|
||||
gcc:centos7:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g -DDIG_SIGCHASE=1"
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:debian:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
unittest:centos:centos6:amd64:
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:centos:centos6:amd64
|
||||
|
||||
unittest:centos:centos7:amd64:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:centos:centos7:amd64
|
||||
|
||||
unittest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
unittest:debian:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:i386
|
||||
|
||||
systemtest:centos:centos6:amd64:
|
||||
<<: *centos_centos6_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:centos:centos6:amd64
|
||||
|
||||
systemtest:centos:centos7:amd64:
|
||||
system:gcc:centos7:amd64:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:centos:centos7:amd64
|
||||
- gcc:centos7:amd64
|
||||
|
||||
systemtest:debian:sid:amd64:
|
||||
unit:gcc:centos7:amd64:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:centos7:amd64
|
||||
|
||||
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)
|
||||
|
||||
gcc:jessie:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--without-cmocka --with-python"
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:jessie:amd64:
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:jessie:amd64
|
||||
|
||||
unit:gcc:jessie:amd64:
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:jessie:amd64
|
||||
|
||||
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)
|
||||
|
||||
gcc:stretch:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:stretch:amd64
|
||||
|
||||
unit:gcc:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:stretch:amd64
|
||||
|
||||
# Jobs for regular GCC builds on Debian Sid (amd64)
|
||||
|
||||
gcc:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
RUN_MAKE_INSTALL: 1
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
systemtest:debian:sid:i386:
|
||||
- gcc:sid:amd64
|
||||
|
||||
unit:gcc:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:sid:amd64
|
||||
|
||||
# Jobs for regular GCC builds on Debian Sid (i386)
|
||||
|
||||
gcc:sid:i386:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:i386
|
||||
- gcc:sid:i386
|
||||
|
||||
install:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *install_test_job
|
||||
unit:gcc:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
- gcc:sid:i386
|
||||
|
||||
# Jobs for regular GCC builds on Fedora 29 (amd64)
|
||||
|
||||
gcc:fedora29:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *fedora_29_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:fedora29:amd64:
|
||||
<<: *fedora_29_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:fedora29:amd64
|
||||
|
||||
unit:gcc:fedora29:amd64:
|
||||
<<: *fedora_29_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:fedora29:amd64
|
||||
|
||||
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
|
||||
|
||||
gcc:xenial:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *ubuntu_xenial_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:xenial:amd64:
|
||||
<<: *ubuntu_xenial_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:xenial:amd64
|
||||
|
||||
unit:gcc:xenial:amd64:
|
||||
<<: *ubuntu_xenial_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:xenial:amd64
|
||||
|
||||
# Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)
|
||||
|
||||
gcc:bionic:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *ubuntu_bionic_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:gcc:bionic:amd64:
|
||||
<<: *ubuntu_bionic_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:bionic:amd64
|
||||
|
||||
unit:gcc:bionic:amd64:
|
||||
<<: *ubuntu_bionic_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:bionic:amd64
|
||||
|
||||
# Jobs for GCC builds with ASAN enabled on Debian Sid (amd64)
|
||||
|
||||
asan:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
|
||||
LDFLAGS: "-fsanitize=address,undefined"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:asan:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- asan:sid:amd64
|
||||
|
||||
unit:asan:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- asan:sid:amd64
|
||||
|
||||
# Jobs for Clang builds on Debian Stretch (amd64)
|
||||
|
||||
clang:stretch:amd64:
|
||||
variables:
|
||||
CC: clang
|
||||
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-python=python3"
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
unit:clang:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- clang:stretch:amd64
|
||||
|
||||
# Jobs for Clang builds on Debian Stretch (i386)
|
||||
|
||||
clang:stretch:i386:
|
||||
variables:
|
||||
CC: clang
|
||||
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-python=python2"
|
||||
<<: *debian_stretch_i386_image
|
||||
<<: *build_job
|
||||
|
||||
# Jobs for PKCS#11-enabled GCC builds on Debian Sid (amd64)
|
||||
|
||||
pkcs11:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:pkcs11:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
|
||||
unit:pkcs11:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- pkcs11:sid:amd64
|
||||
|
||||
# Jobs for GCC builds with assertions compiled away on Debian Sid (amd64)
|
||||
|
||||
noassert:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g -DISC_CHECK_NONE=1"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
system:noassert:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- noassert:sid:amd64
|
||||
|
||||
unit:noassert:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- noassert:sid:amd64
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Content-Type: application/X-atf-atffile; version="1"
|
||||
|
||||
prop: test-suite = bind9
|
||||
|
||||
tp: lib
|
||||
@@ -1,28 +1,214 @@
|
||||
--- 9.11.5-P4 released ---
|
||||
--- 9.11.6-P1 released ---
|
||||
|
||||
--- 9.11.5-P3 released (withdrawn) ---
|
||||
5200. [security] tcp-clients settings could be exceeded in some cases,
|
||||
which could lead to exhaustion of file descriptors.
|
||||
(CVE-2018-5743) [GL #615]
|
||||
|
||||
--- 9.11.6 released ---
|
||||
|
||||
--- 9.11.6rc1 released ---
|
||||
|
||||
5166. [port] openbsd: Threads are now enabled by default. [GL !1548]
|
||||
|
||||
5164. [bug] Correct errno to result translation in dlz filesystem
|
||||
modules. [GL #884]
|
||||
|
||||
5163. [cleanup] Out-of-tree builds failed --enable-dnstap. [GL #836]
|
||||
|
||||
5162. [cleanup] Improve dnssec-keymgr manual. Thanks to Tony Finch.
|
||||
[GL !1518]
|
||||
|
||||
5160. [contrib] Added DNAME support to the DLZ LDAP schema. Also
|
||||
fixed a compilation bug affecting several DLZ
|
||||
modules. [GL #872]
|
||||
|
||||
5159. [bug] dnssec-coverage was incorrectly ignoring
|
||||
names specified on the command line without
|
||||
trailing dots. [GL !1478]
|
||||
|
||||
5158. [protocol] Add support for AMTRELAY and ZONEMD. [GL #867]
|
||||
|
||||
5157. [bug] Nslookup now errors out if there are extra command
|
||||
line arguments. [GL #207]
|
||||
|
||||
5154. [bug] dig: process_opt could be called twice on the same
|
||||
message leading to a assertion failure. [GL #860]
|
||||
|
||||
5148. [bug] named did not sign the TKEY response. [GL #821]
|
||||
|
||||
5147. [bug] dnssec-keymgr: Add a five-minute margin to better
|
||||
handle key events close to 'now'. [GL #848]
|
||||
|
||||
5146. [bug] Removed an unnecessary assert that could be
|
||||
triggered from PKCS#11 modules during
|
||||
deconstruction. [GL #841]
|
||||
|
||||
5143. [bug] dnssec-keymgr and dnssec-coverage failed to find
|
||||
key files for zone names ending in ".". [GL #560]
|
||||
|
||||
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]
|
||||
|
||||
--- 9.11.5-P2 released (withdrawn) ---
|
||||
5140. [bug] Don't immediately mark existing keys as inactive and
|
||||
deleted when running dnssec-keymgr for the first
|
||||
time. [GL #117]
|
||||
|
||||
5139. [bug] If possible, don't use forwarders when priming.
|
||||
This ensures we can get root server IP addresses
|
||||
from priming query response glue, which may not
|
||||
be present if the forwarding server is returning
|
||||
minimal responses. [GL #752]
|
||||
|
||||
5134. [bug] win32: WSAStartup was not called before getservbyname
|
||||
was called. [GL #590]
|
||||
|
||||
5133. [bug] 'rndc managed-keys' didn't handle class and view
|
||||
correctly and failed to add new lines between each
|
||||
view. [GL !1327]
|
||||
|
||||
5128. [bug] Refreshkeytime was not being updated for managed
|
||||
keys zones. [GL #784]
|
||||
|
||||
5127. [bug] rcode.c:maybe_numeric failed to handle NUL in text
|
||||
regions. [GL #807]
|
||||
|
||||
5126. [bug] Named incorrectly accepted empty base64 and hex encoded
|
||||
fields when reading master files. [GL #807]
|
||||
|
||||
5125. [bug] Allow for up to 100 records or 64k of data when caching
|
||||
a negative response. [GL #804]
|
||||
|
||||
5124. [bug] Named could incorrectly return FORMERR rather than
|
||||
SERVFAIL. [GL #804]
|
||||
|
||||
5123. [bug] dig could hang indefinitely after encountering an error
|
||||
before creating a TCP socket. [GL #692]
|
||||
|
||||
5122. [bug] In a "forward first;" configuration, a forwarder
|
||||
timeout did not prevent that forwarder from being
|
||||
queried again after falling back to full recursive
|
||||
resolution. [GL #315]
|
||||
|
||||
5121. [contrib] dlz_stub_driver.c fails to return ISC_R_NOTFOUND on none
|
||||
matching zone names. [GL !1299]
|
||||
|
||||
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]
|
||||
|
||||
5112. [bug] Named/named-checkconf could dump core if there was
|
||||
a missing masters clause and a bad notify clause.
|
||||
[GL #779]
|
||||
|
||||
5111. [bug] Occluded DNSKEY records could make it into the
|
||||
delegating NSEC/NSEC3 bitmap. [GL #742]
|
||||
|
||||
5110. [security] Named leaked memory if there were multiple Key Tag
|
||||
EDNS options present. (CVE-2018-5744) [GL #772]
|
||||
|
||||
|
||||
--- 9.11.5-P1 released ---
|
||||
|
||||
5108. [bug] Named could fail to determine bottom of zone when
|
||||
removing out of date keys leading to invalid NSEC
|
||||
and NSEC3 records being added to the zone. [GL #771]
|
||||
|
||||
5107. [bug] 'host -U' did not work. [GL #769]
|
||||
|
||||
5104. [cleanup] Log clearer informational message when a catz zone
|
||||
is overridden by a zone in named.conf.
|
||||
Thanks to Tony Finch. [GL !1157]
|
||||
|
||||
5103. [bug] Add missing design by contract tests to dns_catz*.
|
||||
[GL #748]
|
||||
|
||||
5102. [bug] dnssec-coverage failed to use the default TTL when
|
||||
checking KSK deletion times leading to a exception.
|
||||
[GL #585]
|
||||
|
||||
5101. [bug] Fix default installation path for Python modules.
|
||||
[GL #730]
|
||||
|
||||
5098. [func] Failed memory allocations are now fatal. [GL #674]
|
||||
|
||||
5097. [cleanup] Remove embedded ATF unit testing framework
|
||||
from BIND source distribution. [GL !875]
|
||||
|
||||
5095. [test] Converted all unit tests from ATF to CMocka;
|
||||
removed the source code for the ATF libraries.
|
||||
Build with "configure --with-cmocka" to enable
|
||||
unit testing. [GL #620]
|
||||
|
||||
5094. [func] Add 'dig -r' to disable reading of .digrc. [GL !970]
|
||||
|
||||
5092. [bug] Address memory leak on SIGTERM in nsupdate when using
|
||||
GSS-TSIG. [GL #558]
|
||||
|
||||
5090. [bug] dig and mdig failed to properly preparse dash value
|
||||
pairs when value was a seperate argument and started
|
||||
with a dash. [GL #584]
|
||||
|
||||
5088. [bug] dig/host/nslookup could crash when interrupted close to
|
||||
a query timeout. [GL #599]
|
||||
|
||||
5087. [test] Check that result tables are complete. [GL #676]
|
||||
|
||||
5086. [func] Log of RPZ now includes the QTYPE and QCLASS. [GL #623]
|
||||
|
||||
5084. [func] Add configure time detection of Utimaco HSM
|
||||
and disable runtime md5/sha1 detection when it
|
||||
compiled with it. [GL #656]
|
||||
|
||||
5079. [func] Disable IDN processing in dig and nslookup
|
||||
when not on a tty. [GL #653]
|
||||
|
||||
5078. [cleanup] Require python components to be explicitly disabled if
|
||||
python is not available on unix platforms. [GL #601]
|
||||
|
||||
5076. [bug] "require-server-cookie" was not effective if
|
||||
"rate-limit" was configured. [GL #617]
|
||||
|
||||
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
|
||||
behavior for auto-reallocated buffers. [GL #644]
|
||||
|
||||
5071. [bug] Comparision of NXT records was broken. [GL #631]
|
||||
|
||||
5070. [bug] Record types which support a empty rdata field were
|
||||
not handling the empty rdata field case. [GL #638]
|
||||
|
||||
5066. [cleanup] Allow unquoted strings to be used as a zone names
|
||||
in response-policy statements. [GL #641]
|
||||
|
||||
5065. [bug] Only set IPV6_USE_MIN_MTU on IPv6. [GL #553]
|
||||
|
||||
5064. [test] Initalize TZ environment variable before calling
|
||||
dns_test_begin in dnstap_test. [GL #624]
|
||||
|
||||
5061. [protocol] Add support for EID and NIMLOC. [GL #626]
|
||||
|
||||
5060. [bug] GID, UID and UINFO could not be loaded using unknown
|
||||
record format. [GL #627]
|
||||
|
||||
5059. [bug] Display a per-view list of zones in the web interface.
|
||||
[GL #427]
|
||||
|
||||
5057. [protocol] Add support for ATMA. [GL #619]
|
||||
|
||||
5051. [doc] Documentation incorrectly stated that the
|
||||
"server-addresses" static-stub zone option accepts
|
||||
custom port numbers. [GL #582]
|
||||
|
||||
5042. [test] Make the chained delegations in reclimit behave
|
||||
like they would in a regular name server. [GL #578]
|
||||
|
||||
5041. [test] The chain test contains a incomplete delegation.
|
||||
[GL #568]
|
||||
|
||||
5039. [bug] Named could fail to preserve owner name case of new
|
||||
RRset. [GL #420]
|
||||
|
||||
4887. [test] Enable the rpzrecurse test to run on Windows.
|
||||
[RT #47093]
|
||||
|
||||
--- 9.11.5 released ---
|
||||
|
||||
--- 9.11.5rc1 released ---
|
||||
@@ -548,7 +734,7 @@
|
||||
required by POSIX. Supply a alternative in
|
||||
isc_file_isdirwritable. [RT #46394]
|
||||
|
||||
4803. [bug] Backport parts of RT #45293 and RT #46267, specifically
|
||||
4803. [bug] Backport parts of RT #45293 and RT #46267, specifically
|
||||
the fix for RT #46055 and mkeys system test
|
||||
improvements. [RT #46430]
|
||||
|
||||
@@ -868,7 +1054,7 @@
|
||||
4660. [bug] Remove spurious "peer" from Windows socket log
|
||||
messages. [RT #45617]
|
||||
|
||||
4659. [bug] Remove spurious log message about lmdb-mapsize
|
||||
4659. [bug] Remove spurious log message about lmdb-mapsize
|
||||
not being supported when parsing builtin
|
||||
configuration file. [RT #45618]
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ top_builddir = @top_builddir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
|
||||
SUBDIRS = make unit lib bin doc
|
||||
SUBDIRS = make lib bin doc
|
||||
TARGETS =
|
||||
PREREQS = bind.keys.h
|
||||
|
||||
|
||||
@@ -8,11 +8,12 @@ Contents
|
||||
4. BIND 9.11 features
|
||||
5. Building BIND
|
||||
6. macOS
|
||||
7. Compile-time options
|
||||
8. Automated testing
|
||||
9. Documentation
|
||||
10. Change log
|
||||
11. Acknowledgments
|
||||
7. Dependencies
|
||||
8. Compile-time options
|
||||
9. Automated testing
|
||||
10. Documentation
|
||||
11. Change log
|
||||
12. Acknowledgments
|
||||
|
||||
Introduction
|
||||
|
||||
@@ -259,20 +260,15 @@ correcting faulty documentation and introducing the following new feature:
|
||||
statements allow updating of subdomains based on a Kerberos or Active
|
||||
Directory machine principal.
|
||||
|
||||
BIND 9.11.5-P1
|
||||
BIND 9.11.6
|
||||
|
||||
BIND 9.11.5-P1 addresses a potentially serious flaw which could cause
|
||||
faulty NSEC3 chains to be regenerated after a change to the DNSSEC signing
|
||||
key of a zone.
|
||||
BIND 9.11.6 is a maintenance release, and also addresses the security
|
||||
flaws disclosed in CVE-2018-5744, CVE-2018-5745, and CVE-2019-6465.
|
||||
|
||||
BIND 9.11.5-P2, 9.11.5-P3
|
||||
BIND 9.11.6-P1
|
||||
|
||||
These were both withdrawn prior to release.
|
||||
|
||||
BIND 9.11.5-P4
|
||||
|
||||
BIND 9.11.5-P4 addresses the security flaws disclosed in CVE-2018-5744,
|
||||
CVE-2018-5745 and CVE-2019-6465.
|
||||
BIND 9.11.6-P1 addresses the security vulnerability disclosed in
|
||||
CVE-2018-5743.
|
||||
|
||||
Building BIND
|
||||
|
||||
@@ -324,6 +320,14 @@ if you have Xcode already installed you can run "xcode-select --install".
|
||||
This will add /usr/include to the system and install the compiler and
|
||||
other tools so that they can be easily found.
|
||||
|
||||
Dependencies
|
||||
|
||||
Portions of BIND that are written in Python, including dnssec-keymgr,
|
||||
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
||||
'argparse' and 'ply' modules to be available. 'argparse' is a standard
|
||||
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
|
||||
pypi.python.org/pypi/ply.
|
||||
|
||||
Compile-time options
|
||||
|
||||
To see a full list of configuration options, run configure --help.
|
||||
@@ -341,13 +345,6 @@ may be necessary to specify a user with the -u option when running named.)
|
||||
To build shared libraries, specify --with-libtool on the configure command
|
||||
line.
|
||||
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying --with-tuning=
|
||||
large on the configure command line. This can improve performance on big
|
||||
servers, but will consume more memory and may degrade performance on
|
||||
smaller systems.
|
||||
|
||||
For the server to support DNSSEC, you need to build it with crypto
|
||||
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
|
||||
installed. If the OpenSSL library is installed in a nonstandard location,
|
||||
@@ -378,13 +375,14 @@ specify the prefix using "--with-geoip=/prefix".
|
||||
For DNSTAP packet logging, you must have installed libfstrm https://
|
||||
github.com/farsightsec/fstrm and libprotobuf-c https://
|
||||
developers.google.com/protocol-buffers, and BIND must be configured with
|
||||
"--enable-dnstap".
|
||||
--enable-dnstap.
|
||||
|
||||
Portions of BIND that are written in Python, including dnssec-keymgr,
|
||||
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
||||
'argparse' and 'ply' modules to be available. 'argparse' is a standard
|
||||
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
|
||||
pypi.python.org/pypi/ply.
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying --with-tuning=
|
||||
large on the configure command line. This can improve performance on big
|
||||
servers, but will consume more memory and may degrade performance on
|
||||
smaller systems.
|
||||
|
||||
On some platforms it is necessary to explicitly request large file support
|
||||
to handle files bigger than 2GB. This can be done by using
|
||||
@@ -399,6 +397,10 @@ If your operating system has integrated support for IPv6, it will be used
|
||||
automatically. If you have installed KAME IPv6 separately, use --with-kame
|
||||
[=PATH] to specify its location.
|
||||
|
||||
The --enable-querytrace option causes named to log every step of
|
||||
processing every query. This should only be enabled when debugging,
|
||||
because it has a significant negative impact on query performance.
|
||||
|
||||
make install will install named and the various BIND 9 libraries. By
|
||||
default, installation is into /usr/local, but this can be changed with the
|
||||
--prefix option when running configure.
|
||||
@@ -424,8 +426,10 @@ and will be skipped if these are not available. Some tests require Python
|
||||
and the 'dnspython' module and will be skipped if these are not available.
|
||||
See bin/tests/system/README for further details.
|
||||
|
||||
Unit tests are implemented using Automated Testing Framework (ATF). To run
|
||||
them, use configure --with-atf, then run make test or make unit.
|
||||
Unit tests are implemented using the CMocka unit testing framework. To
|
||||
build them, use configure --with-cmocka. Execution of tests is done by the
|
||||
Kyua test execution engine; if the kyua command is available, then unit
|
||||
tests can be run via make test or make unit.
|
||||
|
||||
Documentation
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
1. [BIND 9.11 features](#features)
|
||||
1. [Building BIND](#build)
|
||||
1. [macOS](#macos)
|
||||
1. [Dependencies](#dependencies)
|
||||
1. [Compile-time options](#opts)
|
||||
1. [Automated testing](#testing)
|
||||
1. [Documentation](#doc)
|
||||
@@ -276,20 +277,15 @@ feature:
|
||||
statements allow updating of subdomains based on a Kerberos or
|
||||
Active Directory machine principal.
|
||||
|
||||
#### BIND 9.11.5-P1
|
||||
#### BIND 9.11.6
|
||||
|
||||
BIND 9.11.5-P1 addresses a potentially serious flaw which could
|
||||
cause faulty NSEC3 chains to be regenerated after a change to the
|
||||
DNSSEC signing key of a zone.
|
||||
BIND 9.11.6 is a maintenance release, and also addresses the security
|
||||
flaws disclosed in CVE-2018-5744, CVE-2018-5745, and CVE-2019-6465.
|
||||
|
||||
#### BIND 9.11.5-P2, 9.11.5-P3
|
||||
#### BIND 9.11.6-P1
|
||||
|
||||
These were both withdrawn prior to release.
|
||||
|
||||
#### BIND 9.11.5-P4
|
||||
|
||||
BIND 9.11.5-P4 addresses the security flaws disclosed in CVE-2018-5744,
|
||||
CVE-2018-5745 and CVE-2019-6465.
|
||||
BIND 9.11.6-P1 addresses the security vulnerability disclosed in
|
||||
CVE-2018-5743.
|
||||
|
||||
### <a name="build"/> Building BIND
|
||||
|
||||
@@ -334,6 +330,13 @@ or if you have Xcode already installed you can run "xcode-select --install".
|
||||
This will add /usr/include to the system and install the compiler and other
|
||||
tools so that they can be easily found.
|
||||
|
||||
### <a name="dependencies"/> Dependencies
|
||||
|
||||
Portions of BIND that are written in Python, including
|
||||
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
||||
system tests, require the 'argparse' and 'ply' modules to be available.
|
||||
'argparse' is a standard module as of Python 2.7 and Python 3.2.
|
||||
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
|
||||
|
||||
#### <a name="opts"/> Compile-time options
|
||||
|
||||
@@ -352,13 +355,6 @@ specify a user with the -u option when running `named`.)
|
||||
To build shared libraries, specify `--with-libtool` on the `configure`
|
||||
command line.
|
||||
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying
|
||||
`--with-tuning=large` on the `configure` command line. This can improve
|
||||
performance on big servers, but will consume more memory and may degrade
|
||||
performance on smaller systems.
|
||||
|
||||
For the server to support DNSSEC, you need to build it with crypto support.
|
||||
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
|
||||
OpenSSL library is installed in a nonstandard location, specify the prefix
|
||||
@@ -391,13 +387,14 @@ For DNSTAP packet logging, you must have installed libfstrm
|
||||
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
|
||||
and libprotobuf-c
|
||||
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
|
||||
and BIND must be configured with "--enable-dnstap".
|
||||
and BIND must be configured with `--enable-dnstap`.
|
||||
|
||||
Portions of BIND that are written in Python, including
|
||||
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
||||
system tests, require the 'argparse' and 'ply' modules to be available.
|
||||
'argparse' is a standard module as of Python 2.7 and Python 3.2.
|
||||
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying
|
||||
`--with-tuning=large` on the `configure` command line. This can improve
|
||||
performance on big servers, but will consume more memory and may degrade
|
||||
performance on smaller systems.
|
||||
|
||||
On some platforms it is necessary to explicitly request large file support
|
||||
to handle files bigger than 2GB. This can be done by using
|
||||
@@ -412,6 +409,10 @@ If your operating system has integrated support for IPv6, it will be used
|
||||
automatically. If you have installed KAME IPv6 separately, use
|
||||
`--with-kame[=PATH]` to specify its location.
|
||||
|
||||
The `--enable-querytrace` option causes `named` to log every step of
|
||||
processing every query. This should only be enabled when debugging, because
|
||||
it has a significant negative impact on query performance.
|
||||
|
||||
`make install` will install `named` and the various BIND 9 libraries. By
|
||||
default, installation is into /usr/local, but this can be changed with the
|
||||
`--prefix` option when running `configure`.
|
||||
@@ -437,9 +438,10 @@ and will be skipped if these are not available. Some tests require Python
|
||||
and the 'dnspython' module and will be skipped if these are not available.
|
||||
See bin/tests/system/README for further details.
|
||||
|
||||
Unit tests are implemented using Automated Testing Framework (ATF).
|
||||
To run them, use `configure --with-atf`, then run `make test` or
|
||||
`make unit`.
|
||||
Unit tests are implemented using the CMocka unit testing framework.
|
||||
To build them, use `configure --with-cmocka`. Execution of tests is done
|
||||
by the Kyua test execution engine; if the `kyua` command is available,
|
||||
then unit tests can be run via `make test` or `make unit`.
|
||||
|
||||
### <a name="doc"/> Documentation
|
||||
|
||||
|
||||
Vendored
+293
-15
@@ -1,17 +1,295 @@
|
||||
sinclude(libtool.m4/libtool.m4)dnl
|
||||
sinclude(libtool.m4/ltoptions.m4)dnl
|
||||
sinclude(libtool.m4/ltsugar.m4)dnl
|
||||
sinclude(libtool.m4/ltversion.m4)dnl
|
||||
sinclude(libtool.m4/lt~obsolete.m4)dnl
|
||||
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
|
||||
|
||||
m4_divert_text(HELP_CANON, [[
|
||||
NOTE: If PREFIX is not set, then the default values for --sysconfdir
|
||||
and --localstatedir are /etc and /var, respectively.]])
|
||||
m4_divert_text(HELP_END, [[
|
||||
Professional support for BIND is provided by Internet Systems Consortium,
|
||||
Inc. Information about paid support and training options is available at
|
||||
https://www.isc.org/support.
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
|
||||
Help can also often be found on the BIND Users mailing list
|
||||
(https://lists.isc.org/mailman/listinfo/bind-users) or in the #bind
|
||||
channel of the Freenode IRC service.]])
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 12 (pkg-config-0.29.2)
|
||||
|
||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful, but
|
||||
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
dnl General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
dnl 02111-1307, USA.
|
||||
dnl
|
||||
dnl As a special exception to the GNU General Public License, if you
|
||||
dnl distribute this file as part of a program that contains a
|
||||
dnl configuration script generated by Autoconf, you may include it under
|
||||
dnl the same distribution terms that you use for the rest of that
|
||||
dnl program.
|
||||
|
||||
dnl PKG_PREREQ(MIN-VERSION)
|
||||
dnl -----------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Verify that the version of the pkg-config macros are at least
|
||||
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
||||
dnl installed version of pkg-config, this checks the developer's version
|
||||
dnl of pkg.m4 when generating configure.
|
||||
dnl
|
||||
dnl To ensure that this macro is defined, also add:
|
||||
dnl m4_ifndef([PKG_PREREQ],
|
||||
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
||||
dnl
|
||||
dnl See the "Since" comment for each macro you use to see what version
|
||||
dnl of the macros you require.
|
||||
m4_defun([PKG_PREREQ],
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.2])
|
||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||
])dnl PKG_PREREQ
|
||||
|
||||
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||
dnl ----------------------------------
|
||||
dnl Since: 0.16
|
||||
dnl
|
||||
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
||||
dnl first found in the path. Checks that the version of pkg-config found
|
||||
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
||||
dnl used since that's the first version where most current features of
|
||||
dnl pkg-config existed.
|
||||
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||
|
||||
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||
fi
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi[]dnl
|
||||
])dnl PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------------------------------
|
||||
dnl Since: 0.18
|
||||
dnl
|
||||
dnl Check to see whether a particular set of modules exists. Similar to
|
||||
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||
dnl
|
||||
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
dnl only at the first occurence in configure.ac, so if the first place
|
||||
dnl it's called might be skipped (such as if it is within an "if", you
|
||||
dnl have to call PKG_CHECK_EXISTS manually
|
||||
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||
m4_default([$2], [:])
|
||||
m4_ifvaln([$3], [else
|
||||
$3])dnl
|
||||
fi])
|
||||
|
||||
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||
dnl ---------------------------------------------
|
||||
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
||||
dnl pkg_failed based on the result.
|
||||
m4_define([_PKG_CONFIG],
|
||||
[if test -n "$$1"; then
|
||||
pkg_cv_[]$1="$$1"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
PKG_CHECK_EXISTS([$3],
|
||||
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes ],
|
||||
[pkg_failed=yes])
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi[]dnl
|
||||
])dnl _PKG_CONFIG
|
||||
|
||||
dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
dnl ---------------------------
|
||||
dnl Internal check to see if pkg-config supports short errors.
|
||||
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi[]dnl
|
||||
])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||
|
||||
|
||||
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Since: 0.4.0
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||
AC_DEFUN([PKG_CHECK_MODULES],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $2])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
m4_default([$4], [AC_MSG_ERROR(
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||
])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi[]dnl
|
||||
])dnl PKG_CHECK_MODULES
|
||||
|
||||
|
||||
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
dnl [ACTION-IF-NOT-FOUND])
|
||||
dnl ---------------------------------------------------------------------
|
||||
dnl Since: 0.29
|
||||
dnl
|
||||
dnl Checks for existence of MODULES and gathers its build flags with
|
||||
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
||||
dnl and VARIABLE-PREFIX_LIBS from --libs.
|
||||
dnl
|
||||
dnl Note that if there is a possibility the first call to
|
||||
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
||||
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
||||
dnl configure.ac.
|
||||
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
_save_PKG_CONFIG=$PKG_CONFIG
|
||||
PKG_CONFIG="$PKG_CONFIG --static"
|
||||
PKG_CHECK_MODULES($@)
|
||||
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
||||
])dnl PKG_CHECK_MODULES_STATIC
|
||||
|
||||
|
||||
dnl PKG_INSTALLDIR([DIRECTORY])
|
||||
dnl -------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable pkgconfigdir as the location where a module
|
||||
dnl should install pkg-config .pc files. By default the directory is
|
||||
dnl $libdir/pkgconfig, but the default can be changed by passing
|
||||
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||
dnl parameter.
|
||||
AC_DEFUN([PKG_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||
[with_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
])dnl PKG_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
||||
dnl --------------------------------
|
||||
dnl Since: 0.27
|
||||
dnl
|
||||
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||
dnl module should install arch-independent pkg-config .pc files. By
|
||||
dnl default the directory is $datadir/pkgconfig, but the default can be
|
||||
dnl changed by passing DIRECTORY. The user can override through the
|
||||
dnl --with-noarch-pkgconfigdir parameter.
|
||||
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||
m4_pushdef([pkg_description],
|
||||
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||
[with_noarch_pkgconfigdir=]pkg_default)
|
||||
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||
m4_popdef([pkg_default])
|
||||
m4_popdef([pkg_description])
|
||||
])dnl PKG_NOARCH_INSTALLDIR
|
||||
|
||||
|
||||
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
dnl -------------------------------------------
|
||||
dnl Since: 0.28
|
||||
dnl
|
||||
dnl Retrieves the value of the pkg-config variable for the given module.
|
||||
AC_DEFUN([PKG_CHECK_VAR],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||
|
||||
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
|
||||
m4_include([libtool.m4/libtool.m4])
|
||||
m4_include([libtool.m4/ltoptions.m4])
|
||||
m4_include([libtool.m4/ltsugar.m4])
|
||||
m4_include([libtool.m4/ltversion.m4])
|
||||
m4_include([libtool.m4/lt~obsolete.m4])
|
||||
|
||||
+24
-10
@@ -265,8 +265,10 @@ configure_zone(const char *vclass, const char *view,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||
@@ -283,8 +285,10 @@ configure_zone(const char *vclass, const char *view,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||
@@ -310,8 +314,10 @@ configure_zone(const char *vclass, const char *view,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||
@@ -328,8 +334,10 @@ configure_zone(const char *vclass, const char *view,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||
@@ -349,8 +357,10 @@ configure_zone(const char *vclass, const char *view,
|
||||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||
}
|
||||
@@ -366,8 +376,10 @@ configure_zone(const char *vclass, const char *view,
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
@@ -377,14 +389,16 @@ configure_zone(const char *vclass, const char *view,
|
||||
fmtobj = NULL;
|
||||
if (get_maps(maps, "masterfile-format", &fmtobj)) {
|
||||
const char *masterformatstr = cfg_obj_asstring(fmtobj);
|
||||
if (strcasecmp(masterformatstr, "text") == 0)
|
||||
if (strcasecmp(masterformatstr, "text") == 0) {
|
||||
masterformat = dns_masterformat_text;
|
||||
else if (strcasecmp(masterformatstr, "raw") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
||||
masterformat = dns_masterformat_raw;
|
||||
else if (strcasecmp(masterformatstr, "map") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "map") == 0) {
|
||||
masterformat = dns_masterformat_map;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
||||
@@ -141,12 +141,14 @@ main(int argc, char **argv) {
|
||||
#define PROGCMP(X) \
|
||||
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
|
||||
|
||||
if (PROGCMP("named-checkzone"))
|
||||
if (PROGCMP("named-checkzone")) {
|
||||
progmode = progmode_check;
|
||||
else if (PROGCMP("named-compilezone"))
|
||||
} else if (PROGCMP("named-compilezone")) {
|
||||
progmode = progmode_compile;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/* Compilation specific defaults */
|
||||
if (progmode == progmode_compile) {
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "checktool"=".\checktool.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "checktool"=".\checktool.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
@@ -130,10 +130,12 @@ main(int argc, char **argv) {
|
||||
if (PROGCMP("tsig-keygen")) {
|
||||
progmode = progmode_keygen;
|
||||
quiet = true;
|
||||
} else if (PROGCMP("ddns-confgen"))
|
||||
} else if (PROGCMP("ddns-confgen")) {
|
||||
progmode = progmode_confgen;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "confgentool"=".\confgentool.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "confgentool"=".\confgentool.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
+34
-1
@@ -765,7 +765,14 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
if (dlv_validation)
|
||||
dns_client_setdlv(client, dns_rdataclass_in, dlv_anchor);
|
||||
|
||||
|
||||
cleanup:
|
||||
if (bindkeys != NULL) {
|
||||
cfg_obj_destroy(parser, &bindkeys);
|
||||
}
|
||||
if (parser != NULL) {
|
||||
cfg_parser_destroy(&parser);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
delv_log(ISC_LOG_ERROR, "setup_dnsseckeys: %s",
|
||||
isc_result_totext(result));
|
||||
@@ -1179,6 +1186,8 @@ plus_option(char *option) {
|
||||
* options: "46a:b:c:d:himp:q:t:vx:";
|
||||
*/
|
||||
static const char *single_dash_opts = "46himv";
|
||||
static const char *dash_opts = "46abcdhimpqtvx";
|
||||
|
||||
static bool
|
||||
dash_option(char *option, char *next, bool *open_type_class) {
|
||||
char opt, *value;
|
||||
@@ -1236,6 +1245,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
/* NOTREACHED */
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
if (strlen(option) > 1U)
|
||||
option = &option[1];
|
||||
@@ -1379,8 +1389,10 @@ preparse_args(int argc, char **argv) {
|
||||
char *option;
|
||||
|
||||
for (argc--, argv++; argc > 0; argc--, argv++) {
|
||||
if (argv[0][0] != '-')
|
||||
if (argv[0][0] != '-') {
|
||||
continue;
|
||||
}
|
||||
|
||||
option = &argv[0][1];
|
||||
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
||||
switch (option[0]) {
|
||||
@@ -1403,6 +1415,27 @@ preparse_args(int argc, char **argv) {
|
||||
}
|
||||
option = &option[1];
|
||||
}
|
||||
|
||||
if (strlen(option) == 0U) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Look for dash value option. */
|
||||
if (strpbrk(option, dash_opts) != &option[0] ||
|
||||
strlen(option) > 1U)
|
||||
{
|
||||
/* Error or value in option. */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Dash value is next argument so we need to skip it. */
|
||||
argc--;
|
||||
argv++;
|
||||
|
||||
/* Handle missing argument */
|
||||
if (argc == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
-3
@@ -74,7 +74,9 @@ will perform an NS query for "\&." (the root)\&.
|
||||
It is possible to set per\-user defaults for
|
||||
\fBdig\fR
|
||||
via
|
||||
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&.
|
||||
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&. The
|
||||
\fB\-r\fR
|
||||
option disables this feature, for scripts that need predictable behaviour\&.
|
||||
.PP
|
||||
The IN and CH class names overlap with the IN and CH top level domain names\&. Either use the
|
||||
\fB\-t\fR
|
||||
@@ -208,6 +210,12 @@ The domain name to query\&. This is useful to distinguish the
|
||||
from other arguments\&.
|
||||
.RE
|
||||
.PP
|
||||
\-r
|
||||
.RS 4
|
||||
Do not read options from
|
||||
${HOME}/\&.digrc\&. This is useful for scripts that need predictable behaviour\&.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fItype\fR
|
||||
.RS 4
|
||||
The resource record type to query\&. It can be any valid query type\&. If it is a resource record type supported in BIND 9, it can be given by the type mnemonic (such as "NS" or "AAAA")\&. The default query type is "A", unless the
|
||||
@@ -468,12 +476,16 @@ option is enabled\&. If short form answers are requested, the default is not to
|
||||
.PP
|
||||
\fB+[no]idnin\fR
|
||||
.RS 4
|
||||
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to process IDN input\&.
|
||||
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&.
|
||||
.sp
|
||||
The default is to process IDN input when standard output is a tty\&. The IDN processing on input is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]idnout\fR
|
||||
.RS 4
|
||||
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to convert output\&.
|
||||
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&.
|
||||
.sp
|
||||
The default is to process puny code on output when standard output is a tty\&. The puny code processing on output is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ignore\fR
|
||||
|
||||
+40
-6
@@ -69,7 +69,7 @@ static bool short_form = false, printcmd = true,
|
||||
multiline = false, nottl = false, noclass = false,
|
||||
onesoa = false, use_usec = false,
|
||||
nocrypto = false, ttlunits = false,
|
||||
ipv4only = false, ipv6only = false;
|
||||
ipv4only = false, ipv6only = false, digrc = true;
|
||||
static uint32_t splitwidth = 0xffffffff;
|
||||
|
||||
/*% rrcomments are neither explicitly enabled nor disabled by default */
|
||||
@@ -158,6 +158,7 @@ help(void) {
|
||||
" -m (enable memory usage debugging)\n"
|
||||
" -p port (specify port number)\n"
|
||||
" -q name (specify query name)\n"
|
||||
" -r (do not read ~/.digrc)\n"
|
||||
" -t type (specify query type)\n"
|
||||
" -u (display times in usec instead of msec)\n"
|
||||
" -x dot-notation (shortcut for reverse lookups)\n"
|
||||
@@ -193,8 +194,10 @@ help(void) {
|
||||
" +[no]fail (Don't try next server on SERVFAIL)\n"
|
||||
" +[no]header-only (Send query without a question section)\n"
|
||||
" +[no]identify (ID responders in short answers)\n"
|
||||
" +[no]idnin (Parse IDN names)\n"
|
||||
" +[no]idnout (Convert IDN response)\n"
|
||||
#ifdef HAVE_LIBIDN2
|
||||
" +[no]idnin (Parse IDN names [default=on on tty])\n"
|
||||
" +[no]idnout (Convert IDN response [default=on on tty])\n"
|
||||
#endif
|
||||
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
|
||||
" +[no]keepopen (Keep the TCP socket open between queries)\n"
|
||||
" +[no]mapped (Allow mapped IPv4 over IPv6)\n"
|
||||
@@ -1525,8 +1528,8 @@ plus_option(const char *option, bool is_batchfile,
|
||||
/*%
|
||||
* #true returned if value was used
|
||||
*/
|
||||
static const char *single_dash_opts = "46dhimnuv";
|
||||
static const char *dash_opts = "46bcdfhikmnptvyx";
|
||||
static const char *single_dash_opts = "46dhimnruv";
|
||||
static const char *dash_opts = "46bcdfhikmnpqrtvyx";
|
||||
static bool
|
||||
dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
bool *open_type_class, bool *need_clone,
|
||||
@@ -1597,6 +1600,10 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
case 'n':
|
||||
/* deprecated */
|
||||
break;
|
||||
case 'r':
|
||||
debug("digrc (late)");
|
||||
digrc = false;
|
||||
break;
|
||||
case 'u':
|
||||
use_usec = true;
|
||||
break;
|
||||
@@ -1829,11 +1836,23 @@ preparse_args(int argc, char **argv) {
|
||||
option = &rv[0][1];
|
||||
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
||||
switch (option[0]) {
|
||||
case 'd':
|
||||
/* For debugging early startup */
|
||||
debugging = true;
|
||||
break;
|
||||
case 'm':
|
||||
memdebugging = true;
|
||||
isc_mem_debugging = ISC_MEM_DEBUGTRACE |
|
||||
ISC_MEM_DEBUGRECORD;
|
||||
break;
|
||||
case 'r':
|
||||
/*
|
||||
* Must be done early, because ~/.digrc
|
||||
* is read before command line parsing
|
||||
*/
|
||||
debug("digrc (early)");
|
||||
digrc = false;
|
||||
break;
|
||||
case '4':
|
||||
if (ipv6only)
|
||||
fatal("only one of -4 and -6 allowed");
|
||||
@@ -1847,6 +1866,20 @@ preparse_args(int argc, char **argv) {
|
||||
}
|
||||
option = &option[1];
|
||||
}
|
||||
if (strlen(option) == 0U) {
|
||||
continue;
|
||||
}
|
||||
/* Look for dash value option. */
|
||||
if (strpbrk(option, dash_opts) != &option[0] ||
|
||||
strlen(option) > 1U) {
|
||||
/* Error or value in option. */
|
||||
continue;
|
||||
}
|
||||
/* Dash value is next argument so we need to skip it. */
|
||||
rc--, rv++;
|
||||
/* Handle missing argument */
|
||||
if (rc == 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1899,8 +1932,9 @@ parse_args(bool is_batchfile, bool config_only,
|
||||
*/
|
||||
INSIST(batchfp == NULL);
|
||||
homedir = getenv("HOME");
|
||||
if (homedir != NULL) {
|
||||
if (homedir != NULL && digrc) {
|
||||
unsigned int n;
|
||||
debug("digrc (open)");
|
||||
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
|
||||
homedir);
|
||||
if (n < sizeof(rcfile))
|
||||
|
||||
+28
-5
@@ -132,9 +132,10 @@
|
||||
|
||||
<para>
|
||||
It is possible to set per-user defaults for <command>dig</command> via
|
||||
<filename>${HOME}/.digrc</filename>. This file is read and
|
||||
any options in it
|
||||
are applied before the command line arguments.
|
||||
<filename>${HOME}/.digrc</filename>. This file is read and any
|
||||
options in it are applied before the command line arguments.
|
||||
The <option>-r</option> option disables this feature, for
|
||||
scripts that need predictable behaviour.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -335,6 +336,16 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Do not read options from <filename>${HOME}/.digrc</filename>.
|
||||
This is useful for scripts that need predictable behaviour.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||
<listitem>
|
||||
@@ -790,7 +801,13 @@
|
||||
<para>
|
||||
Process [do not process] IDN domain names on input.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to process IDN input.
|
||||
compile time.
|
||||
</para>
|
||||
<para>
|
||||
The default is to process IDN input when standard output
|
||||
is a tty. The IDN processing on input is disabled when
|
||||
dig output is redirected to files, pipes, and other
|
||||
non-tty file descriptors.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -801,7 +818,13 @@
|
||||
<para>
|
||||
Convert [do not convert] puny code on output.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to convert output.
|
||||
compile time.
|
||||
</para>
|
||||
<para>
|
||||
The default is to process puny code on output when
|
||||
standard output is a tty. The puny code processing on
|
||||
output is disabled when dig output is redirected to
|
||||
files, pipes, and other non-tty file descriptors.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
+25
-5
@@ -106,9 +106,10 @@
|
||||
|
||||
<p>
|
||||
It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
|
||||
<code class="filename">${HOME}/.digrc</code>. This file is read and
|
||||
any options in it
|
||||
are applied before the command line arguments.
|
||||
<code class="filename">${HOME}/.digrc</code>. This file is read and any
|
||||
options in it are applied before the command line arguments.
|
||||
The <code class="option">-r</code> option disables this feature, for
|
||||
scripts that need predictable behaviour.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -274,6 +275,13 @@
|
||||
the <em class="parameter"><code>name</code></em> from other arguments.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-r</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Do not read options from <code class="filename">${HOME}/.digrc</code>.
|
||||
This is useful for scripts that need predictable behaviour.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -631,7 +639,13 @@
|
||||
<p>
|
||||
Process [do not process] IDN domain names on input.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to process IDN input.
|
||||
compile time.
|
||||
</p>
|
||||
<p>
|
||||
The default is to process IDN input when standard output
|
||||
is a tty. The IDN processing on input is disabled when
|
||||
dig output is redirected to files, pipes, and other
|
||||
non-tty file descriptors.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
|
||||
@@ -639,7 +653,13 @@
|
||||
<p>
|
||||
Convert [do not convert] puny code on output.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to convert output.
|
||||
compile time.
|
||||
</p>
|
||||
<p>
|
||||
The default is to process puny code on output when
|
||||
standard output is a tty. The puny code processing on
|
||||
output is disabled when dig output is redirected to
|
||||
files, pipes, and other non-tty file descriptors.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
|
||||
|
||||
+62
-43
@@ -824,12 +824,12 @@ make_empty_lookup(void) {
|
||||
looknew->seenbadcookie = false;
|
||||
looknew->badcookie = true;
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
looknew->idnin = true;
|
||||
looknew->idnin = isatty(1)?(getenv("IDN_DISABLE") == NULL):false;
|
||||
#else
|
||||
looknew->idnin = false;
|
||||
#endif
|
||||
#ifdef WITH_IDN_OUT_SUPPORT
|
||||
looknew->idnout = true;
|
||||
looknew->idnout = looknew->idnin;
|
||||
#else
|
||||
looknew->idnout = false;
|
||||
#endif
|
||||
@@ -2648,7 +2648,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
|
||||
if (lookup->ecs_addr != NULL) {
|
||||
uint8_t addr[16];
|
||||
uint16_t family;
|
||||
uint16_t family = 0;
|
||||
uint32_t plen;
|
||||
struct sockaddr *sa;
|
||||
struct sockaddr_in *sin;
|
||||
@@ -2705,6 +2705,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_buffer_init(&b, ecsbuf, sizeof(ecsbuf));
|
||||
@@ -3035,27 +3036,6 @@ send_tcp_connect(dig_query_t *query) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (specified_source &&
|
||||
(isc_sockaddr_pf(&query->sockaddr) !=
|
||||
isc_sockaddr_pf(&bind_address))) {
|
||||
printf(";; Skipping server %s, incompatible "
|
||||
"address family\n", query->servname);
|
||||
query->waiting_connect = false;
|
||||
if (ISC_LINK_LINKED(query, link))
|
||||
next = ISC_LIST_NEXT(query, link);
|
||||
else
|
||||
next = NULL;
|
||||
l = query->lookup;
|
||||
clear_query(query);
|
||||
if (next == NULL) {
|
||||
printf(";; No acceptable nameservers\n");
|
||||
check_next_lookup(l);
|
||||
return;
|
||||
}
|
||||
send_tcp_connect(next);
|
||||
return;
|
||||
}
|
||||
|
||||
INSIST(query->sock == NULL);
|
||||
|
||||
if (keep != NULL && isc_sockaddr_equal(&keepaddr, &query->sockaddr)) {
|
||||
@@ -3217,6 +3197,36 @@ send_udp(dig_query_t *query) {
|
||||
sendcount++;
|
||||
}
|
||||
|
||||
/*%
|
||||
* If there are more servers available for querying within 'lookup', initiate a
|
||||
* TCP or UDP query to the next available server and return true; otherwise,
|
||||
* return false.
|
||||
*/
|
||||
static bool
|
||||
try_next_server(dig_lookup_t *lookup) {
|
||||
dig_query_t *current_query, *next_query;
|
||||
|
||||
current_query = lookup->current_query;
|
||||
if (current_query == NULL || !ISC_LINK_LINKED(current_query, link)) {
|
||||
return (false);
|
||||
}
|
||||
|
||||
next_query = ISC_LIST_NEXT(current_query, link);
|
||||
if (next_query == NULL) {
|
||||
return (false);
|
||||
}
|
||||
|
||||
debug("trying next server...");
|
||||
|
||||
if (lookup->tcp_mode) {
|
||||
send_tcp_connect(next_query);
|
||||
} else {
|
||||
send_udp(next_query);
|
||||
}
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
/*%
|
||||
* IO timeout handler, used for both connect and recv timeouts. If
|
||||
* retries are still allowed, either resend the UDP packet or queue a
|
||||
@@ -3225,7 +3235,7 @@ send_udp(dig_query_t *query) {
|
||||
static void
|
||||
connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
dig_lookup_t *l = NULL;
|
||||
dig_query_t *query = NULL, *cq;
|
||||
dig_query_t *query = NULL;
|
||||
|
||||
UNUSED(task);
|
||||
REQUIRE(event->ev_type == ISC_TIMEREVENT_IDLE);
|
||||
@@ -3239,18 +3249,19 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
INSIST(!free_now);
|
||||
|
||||
if ((query != NULL) && (query->lookup->current_query != NULL) &&
|
||||
ISC_LINK_LINKED(query->lookup->current_query, link) &&
|
||||
(ISC_LIST_NEXT(query->lookup->current_query, link) != NULL)) {
|
||||
debug("trying next server...");
|
||||
cq = query->lookup->current_query;
|
||||
if (!l->tcp_mode)
|
||||
send_udp(ISC_LIST_NEXT(cq, link));
|
||||
else {
|
||||
if (query->sock != NULL)
|
||||
if (cancel_now) {
|
||||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
}
|
||||
|
||||
if (try_next_server(l)) {
|
||||
if (l->tcp_mode) {
|
||||
if (query->sock != NULL) {
|
||||
isc_socket_cancel(query->sock, NULL,
|
||||
ISC_SOCKCANCEL_ALL);
|
||||
send_tcp_connect(ISC_LIST_NEXT(cq, link));
|
||||
} else {
|
||||
clear_query(query);
|
||||
}
|
||||
}
|
||||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
@@ -3705,7 +3716,7 @@ process_cookie(dig_lookup_t *l, dns_message_t *msg,
|
||||
}
|
||||
|
||||
INSIST(msg->cc_ok == 0 && msg->cc_bad == 0);
|
||||
if (optlen >= len && optlen >= 8U) {
|
||||
if (len >= 8 && optlen >= 8U) {
|
||||
if (isc_safe_memequal(isc_buffer_current(optbuf), sent, 8)) {
|
||||
msg->cc_ok = 1;
|
||||
} else {
|
||||
@@ -3795,6 +3806,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
dig_lookup_t *n, *l;
|
||||
bool docancel = false;
|
||||
bool match = true;
|
||||
bool done_process_opt = false;
|
||||
unsigned int parseflags;
|
||||
dns_messageid_t id;
|
||||
unsigned int msgflags;
|
||||
@@ -4105,6 +4117,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
}
|
||||
done_process_opt = true;
|
||||
}
|
||||
if ((msg->rcode == dns_rcode_servfail && !l->servfail_stops) ||
|
||||
(check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && l->recurse))
|
||||
@@ -4194,13 +4207,17 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (l->cookie != NULL) {
|
||||
if (msg->opt == NULL)
|
||||
printf(";; expected opt record in response\n");
|
||||
else
|
||||
if (!done_process_opt) {
|
||||
if (l->cookie != NULL) {
|
||||
if (msg->opt == NULL) {
|
||||
printf(";; expected opt record in response\n");
|
||||
} else {
|
||||
process_opt(l, msg);
|
||||
}
|
||||
} else if (l->sendcookie && msg->opt != NULL) {
|
||||
process_opt(l, msg);
|
||||
} else if (l->sendcookie && msg->opt != NULL)
|
||||
process_opt(l, msg);
|
||||
}
|
||||
}
|
||||
if (!l->doing_xfr || l->xfr_q == query) {
|
||||
if (msg->rcode == dns_rcode_nxdomain &&
|
||||
(l->origin != NULL || l->need_search)) {
|
||||
@@ -5370,7 +5387,7 @@ child_of_zone(dns_name_t * name, dns_name_t * zone_name,
|
||||
|
||||
name_reln = dns_name_fullcompare(name, zone_name, &orderp, &nlabelsp);
|
||||
if (name_reln != dns_namereln_subdomain ||
|
||||
dns_name_countlabels(name) <= dns_name_countlabels(zone_name) + 1) {
|
||||
dns_name_countlabels(name) < dns_name_countlabels(zone_name) + 1) {
|
||||
printf("\n;; ERROR : ");
|
||||
dns_name_print(name, stdout);
|
||||
printf(" is not a subdomain of: ");
|
||||
@@ -5962,6 +5979,8 @@ sigchase_td(dns_message_t *msg)
|
||||
dns_name_init(&tmp_name, NULL);
|
||||
result = child_of_zone(&chase_name, &chase_current_name,
|
||||
&tmp_name);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanandgo;
|
||||
if (dns_name_dynamic(&chase_authority_name))
|
||||
free_name(&chase_authority_name);
|
||||
dup_name(&tmp_name, &chase_authority_name);
|
||||
|
||||
+11
-9
@@ -158,6 +158,7 @@ show_usage(void) {
|
||||
" -s a SERVFAIL response should stop query\n"
|
||||
" -t specifies the query type\n"
|
||||
" -T enables TCP/IP mode\n"
|
||||
" -U enables UDP mode\n"
|
||||
" -v enables verbose output\n"
|
||||
" -V print version number and exit\n"
|
||||
" -w specifies to wait forever for a reply\n"
|
||||
@@ -635,28 +636,29 @@ pre_parse_args(int argc, char **argv) {
|
||||
break;
|
||||
case 'a': break;
|
||||
case 'c': break;
|
||||
case 'C': break;
|
||||
case 'd': break;
|
||||
case 'D':
|
||||
if (debugging)
|
||||
debugtiming = true;
|
||||
debugging = true;
|
||||
break;
|
||||
case 'i': break;
|
||||
case 'l': break;
|
||||
case 'n': break;
|
||||
case 'N': break;
|
||||
case 'r': break;
|
||||
case 'R': break;
|
||||
case 's': break;
|
||||
case 't': break;
|
||||
case 'T': break;
|
||||
case 'U': break;
|
||||
case 'v': break;
|
||||
case 'V':
|
||||
version();
|
||||
exit(0);
|
||||
break;
|
||||
case 'w': break;
|
||||
case 'C': break;
|
||||
case 'D':
|
||||
if (debugging)
|
||||
debugtiming = true;
|
||||
debugging = true;
|
||||
break;
|
||||
case 'N': break;
|
||||
case 'R': break;
|
||||
case 'T': break;
|
||||
case 'W': break;
|
||||
default:
|
||||
show_usage();
|
||||
|
||||
@@ -277,6 +277,17 @@ Try the next nameserver if a nameserver responds with SERVFAIL or a referral (no
|
||||
.PP
|
||||
\fBnslookup\fR
|
||||
returns with an exit status of 1 if any query failed, and 0 otherwise\&.
|
||||
.SH "IDN SUPPORT"
|
||||
.PP
|
||||
If
|
||||
\fBnslookup\fR
|
||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
||||
\fBnslookup\fR
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, define the
|
||||
\fBIDN_DISABLE\fR
|
||||
environment variable\&. The IDN support is disabled if the variable is set when
|
||||
\fBnslookup\fR
|
||||
runs or when the standard output is not a tty\&.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
/etc/resolv\&.conf
|
||||
|
||||
+21
-1
@@ -891,12 +891,29 @@ get_next_command(void) {
|
||||
isc_mem_free(mctx, buf);
|
||||
}
|
||||
|
||||
ISC_PLATFORM_NORETURN_PRE static void
|
||||
usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr,
|
||||
" nslookup [-opt ...] # interactive mode using default server\n");
|
||||
fprintf(stderr,
|
||||
" nslookup [-opt ...] - server # interactive mode using 'server'\n");
|
||||
fprintf(stderr,
|
||||
" nslookup [-opt ...] host # just look up 'host' using default server\n");
|
||||
fprintf(stderr,
|
||||
" nslookup [-opt ...] host server # just look up 'host' using 'server'\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void
|
||||
parse_args(int argc, char **argv) {
|
||||
bool have_lookup = false;
|
||||
|
||||
usesearch = true;
|
||||
for (argc--, argv++; argc > 0; argc--, argv++) {
|
||||
for (argc--, argv++; argc > 0 && argv[0] != NULL; argc--, argv++) {
|
||||
debug("main parsing %s", argv[0]);
|
||||
if (argv[0][0] == '-') {
|
||||
if (strncasecmp(argv[0], "-ver", 4) == 0) {
|
||||
@@ -912,6 +929,9 @@ parse_args(int argc, char **argv) {
|
||||
in_use = true;
|
||||
addlookup(argv[0]);
|
||||
} else {
|
||||
if (argv[1] != NULL) {
|
||||
usage();
|
||||
}
|
||||
set_nameserver(argv[0]);
|
||||
check_ra = false;
|
||||
}
|
||||
|
||||
@@ -479,6 +479,22 @@ nslookup -query=hinfo -timeout=10
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>IDN SUPPORT</title></info>
|
||||
|
||||
<para>
|
||||
If <command>nslookup</command> has been built with IDN (internationalized
|
||||
domain name) support, it can accept and display non-ASCII domain names.
|
||||
<command>nslookup</command> appropriately converts character encoding of
|
||||
domain name before sending a request to DNS server or displaying a
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, define
|
||||
the <envar>IDN_DISABLE</envar> environment variable.
|
||||
The IDN support is disabled if the variable is set when
|
||||
<command>nslookup</command> runs or when the standard output is not
|
||||
a tty.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>FILES</title></info>
|
||||
|
||||
<para><filename>/etc/resolv.conf</filename>
|
||||
|
||||
+19
-2
@@ -362,14 +362,31 @@ nslookup -query=hinfo -timeout=10
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.11"></a><h2>FILES</h2>
|
||||
<a name="id-1.11"></a><h2>IDN SUPPORT</h2>
|
||||
|
||||
<p>
|
||||
If <span class="command"><strong>nslookup</strong></span> has been built with IDN (internationalized
|
||||
domain name) support, it can accept and display non-ASCII domain names.
|
||||
<span class="command"><strong>nslookup</strong></span> appropriately converts character encoding of
|
||||
domain name before sending a request to DNS server or displaying a
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, define
|
||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
||||
The IDN support is disabled if the variable is set when
|
||||
<span class="command"><strong>nslookup</strong></span> runs or when the standard output is not
|
||||
a tty.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.12"></a><h2>FILES</h2>
|
||||
|
||||
<p><code class="filename">/etc/resolv.conf</code>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.12"></a><h2>SEE ALSO</h2>
|
||||
<a name="id-1.13"></a><h2>SEE ALSO</h2>
|
||||
|
||||
<p><span class="citerefentry">
|
||||
<span class="refentrytitle">dig</span>(1)
|
||||
|
||||
+29
-29
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "dighost"=".\dighost.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "dighost"=".\dighost.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
+103
-44
@@ -39,61 +39,103 @@
|
||||
dnssec-dsfromkey \- DNSSEC DS RR generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] {keyfile}
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {keyfile}
|
||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||
\fBdnssec\-dsfromkey\fR {\-s} [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-s\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-A\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {dnsname}
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-A\fR] {\fB\-f\ \fR\fB\fIfile\fR\fR} [dnsname]
|
||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-h\fR] [\fB\-V\fR]
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {\-s} {dnsname}
|
||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-h\fR | \fB\-V\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
The
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s)\&.
|
||||
command outputs DS (Delegation Signer) resource records (RRs) and other similarly\-constructed RRs: with the
|
||||
\fB\-l\fR
|
||||
option it outputs DLV (DNSSEC Lookaside Validation) RRs; or with the
|
||||
\fB\-C\fR
|
||||
it outputs CDS (Child DS) RRs\&.
|
||||
.PP
|
||||
The input keys can be specified in a number of ways:
|
||||
.PP
|
||||
By default,
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
reads a key file named like
|
||||
Knnnn\&.+aaa+iiiii\&.key, as generated by
|
||||
\fBdnssec\-keygen\fR\&.
|
||||
.PP
|
||||
With the
|
||||
\fB\-f \fR\fB\fIfile\fR\fR
|
||||
option,
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
reads keys from a zone file or partial zone file (which can contain just the DNSKEY records)\&.
|
||||
.PP
|
||||
With the
|
||||
\fB\-s\fR
|
||||
option,
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
reads a
|
||||
keyset\-
|
||||
file, as generated by
|
||||
\fBdnssec\-keygen\fR\fB\-C\fR\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-1
|
||||
.RS 4
|
||||
Use SHA\-1 as the digest algorithm (the default is to use both SHA\-1 and SHA\-256)\&.
|
||||
An abbreviation for
|
||||
\fB\-a SHA1\fR
|
||||
.RE
|
||||
.PP
|
||||
\-2
|
||||
.RS 4
|
||||
Use SHA\-256 as the digest algorithm\&.
|
||||
An abbreviation for
|
||||
\fB\-a SHA\-256\fR
|
||||
.RE
|
||||
.PP
|
||||
\-a \fIalgorithm\fR
|
||||
.RS 4
|
||||
Select the digest algorithm\&. The value of
|
||||
\fBalgorithm\fR
|
||||
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST or SHA\-384 (SHA384)\&. These values are case insensitive\&.
|
||||
Specify a digest algorithm to use when converting DNSKEY records to DS records\&. This option can be repeated, so that multiple DS records are created for each DNSKEY record\&.
|
||||
.sp
|
||||
The
|
||||
\fIalgorithm\fR
|
||||
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&.
|
||||
.RE
|
||||
.PP
|
||||
\-A
|
||||
.RS 4
|
||||
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in
|
||||
\fB\-f\fR
|
||||
zone file mode\&.
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Specifies the DNS class (default is IN)\&. Useful only in
|
||||
\fB\-s\fR
|
||||
keyset or
|
||||
\fB\-f\fR
|
||||
zone file mode\&.
|
||||
.RE
|
||||
.PP
|
||||
\-C
|
||||
.RS 4
|
||||
Generate CDS records rather than DS records\&. This is mutually exclusive with generating lookaside records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-T \fITTL\fR
|
||||
.RS 4
|
||||
Specifies the TTL of the DS records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-K \fIdirectory\fR
|
||||
.RS 4
|
||||
Look for key files (or, in keyset mode,
|
||||
keyset\-
|
||||
files) in
|
||||
\fBdirectory\fR\&.
|
||||
Generate CDS records rather than DS records\&. This is mutually exclusive with the
|
||||
\fB\-l\fR
|
||||
option for generating DLV records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIfile\fR
|
||||
.RS 4
|
||||
Zone file mode: in place of the keyfile name, the argument is the DNS domain name of a zone master file, which can be read from
|
||||
Zone file mode:
|
||||
\fBdnssec\-dsfromkey\fR\*(Aqs final
|
||||
\fIdnsname\fR
|
||||
argument is the DNS domain name of a zone whose master file can be read from
|
||||
\fBfile\fR\&. If the zone name is the same as
|
||||
\fBfile\fR, then it may be omitted\&.
|
||||
.sp
|
||||
If
|
||||
\fBfile\fR
|
||||
is set to
|
||||
\fIfile\fR
|
||||
is
|
||||
"\-", then the zone data is read from the standard input\&. This makes it possible to use the output of the
|
||||
\fBdig\fR
|
||||
command as input, as in:
|
||||
@@ -101,26 +143,41 @@ command as input, as in:
|
||||
\fBdig dnskey example\&.com | dnssec\-dsfromkey \-f \- example\&.com\fR
|
||||
.RE
|
||||
.PP
|
||||
\-A
|
||||
\-h
|
||||
.RS 4
|
||||
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in zone file mode\&.
|
||||
Prints usage information\&.
|
||||
.RE
|
||||
.PP
|
||||
\-K \fIdirectory\fR
|
||||
.RS 4
|
||||
Look for key files or
|
||||
keyset\-
|
||||
files in
|
||||
\fBdirectory\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-l \fIdomain\fR
|
||||
.RS 4
|
||||
Generate a DLV set instead of a DS set\&. The specified
|
||||
\fBdomain\fR
|
||||
is appended to the name for each record in the set\&. The DNSSEC Lookaside Validation (DLV) RR is described in RFC 4431\&. This is mutually exclusive with generating CDS records\&.
|
||||
\fIdomain\fR
|
||||
is appended to the name for each record in the set\&. This is mutually exclusive with the
|
||||
\fB\-C\fR
|
||||
option for generating CDS records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s
|
||||
.RS 4
|
||||
Keyset mode: in place of the keyfile name, the argument is the DNS domain name of a keyset file\&.
|
||||
Keyset mode:
|
||||
\fBdnssec\-dsfromkey\fR\*(Aqs final
|
||||
\fIdnsname\fR
|
||||
argument is the DNS domain name used to locate a
|
||||
keyset\-
|
||||
file\&.
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
\-T \fITTL\fR
|
||||
.RS 4
|
||||
Specifies the DNS class (default is IN)\&. Useful only in keyset or zone file mode\&.
|
||||
Specifies the TTL of the DS records\&. By default the TTL is omitted\&.
|
||||
.RE
|
||||
.PP
|
||||
\-v \fIlevel\fR
|
||||
@@ -128,11 +185,6 @@ Specifies the DNS class (default is IN)\&. Useful only in keyset or zone file mo
|
||||
Sets the debugging level\&.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints usage information\&.
|
||||
.RE
|
||||
.PP
|
||||
\-V
|
||||
.RS 4
|
||||
Prints version information\&.
|
||||
@@ -141,16 +193,16 @@ Prints version information\&.
|
||||
.PP
|
||||
To build the SHA\-256 DS RR from the
|
||||
\fBKexample\&.com\&.+003+26160\fR
|
||||
keyfile name, the following command would be issued:
|
||||
keyfile name, you can issue the following command:
|
||||
.PP
|
||||
\fBdnssec\-dsfromkey \-2 Kexample\&.com\&.+003+26160\fR
|
||||
.PP
|
||||
The command would print something like:
|
||||
.PP
|
||||
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94\fR
|
||||
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94\fR
|
||||
.SH "FILES"
|
||||
.PP
|
||||
The keyfile can be designed by the key identification
|
||||
The keyfile can be designated by the key identification
|
||||
Knnnn\&.+aaa+iiiii
|
||||
or the full file name
|
||||
Knnnn\&.+aaa+iiiii\&.key
|
||||
@@ -170,9 +222,16 @@ A keyfile error can give a "file not found" even if the file exists\&.
|
||||
\fBdnssec-keygen\fR(8),
|
||||
\fBdnssec-signzone\fR(8),
|
||||
BIND 9 Administrator Reference Manual,
|
||||
RFC 3658,
|
||||
RFC 4431\&.
|
||||
RFC 4509\&.
|
||||
RFC 3658
|
||||
(DS RRs),
|
||||
RFC 4431
|
||||
(DLV RRs),
|
||||
RFC 4509
|
||||
(SHA\-256 for DS RRs),
|
||||
RFC 6605
|
||||
(SHA\-384 for DS RRs),
|
||||
RFC 7344
|
||||
(CDS and CDNSKEY RRs)\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
|
||||
@@ -319,30 +319,27 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, " %s options [-K dir] keyfile\n\n", program);
|
||||
fprintf(stderr, " %s options [-K dir] [-c class] -s dnsname\n\n",
|
||||
program);
|
||||
fprintf(stderr, " %s options -f zonefile (as zone name)\n\n", program);
|
||||
fprintf(stderr, " %s options -f zonefile zonename\n\n", program);
|
||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
||||
fprintf(stderr, " %s [options] -f zonefile [zonename]\n\n", program);
|
||||
fprintf(stderr, " %s [options] -s dnsname\n\n", program);
|
||||
fprintf(stderr, " %s [-h|-V]\n\n", program);
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
fprintf(stderr, "Options:\n");
|
||||
fprintf(stderr, " -v <verbose level>\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, " -K <directory>: directory in which to find "
|
||||
"key file or keyset file\n");
|
||||
fprintf(stderr, " -a algorithm: digest algorithm "
|
||||
"(SHA-1, SHA-256, GOST or SHA-384)\n");
|
||||
fprintf(stderr, " -1: use SHA-1\n");
|
||||
fprintf(stderr, " -2: use SHA-256\n");
|
||||
fprintf(stderr, " -C: print CDS record\n");
|
||||
fprintf(stderr, " -l: add lookaside zone and print DLV records\n");
|
||||
fprintf(stderr, " -s: read keyset from keyset-<dnsname> file\n");
|
||||
fprintf(stderr, " -c class: rdata class for DS set (default: IN)\n");
|
||||
fprintf(stderr, " -T TTL\n");
|
||||
fprintf(stderr, " -f file: read keyset from zone file\n");
|
||||
fprintf(stderr, " -A: when used with -f, "
|
||||
"include all keys in DS set, not just KSKs\n");
|
||||
fprintf(stderr, "Output: DS or DLV RRs\n");
|
||||
fprintf(stderr, "Options:\n"
|
||||
" -1: digest algorithm SHA-1\n"
|
||||
" -2: digest algorithm SHA-256\n"
|
||||
" -a algorithm: digest algorithm (SHA-1, SHA-256, SHA-384 or GOST)\n"
|
||||
" -A: include all keys in DS set, not just KSKs (-f only)\n"
|
||||
" -c class: rdata class for DS set (default IN) (-f or -s only)\n"
|
||||
" -C: print CDS records\n"
|
||||
" -f zonefile: read keys from a zone file\n"
|
||||
" -h: print help information\n"
|
||||
" -K directory: where to find key or keyset files\n"
|
||||
" -l zone: print DLV records in the given lookaside zone\n"
|
||||
" -s: read keys from keyset-<dnsname> file\n"
|
||||
" -T: TTL of output records (omitted by default)\n"
|
||||
" -v level: verbosity\n"
|
||||
" -V: print version information\n");
|
||||
fprintf(stderr, "Output: DS, DLV, or CDS RRs\n");
|
||||
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
@@ -49,56 +49,108 @@
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
<group choice="opt">
|
||||
<arg choice="plain"><option>-1</option></arg>
|
||||
<arg choice="plain"><option>-2</option></arg>
|
||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
</group>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">keyfile</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<arg choice="req" rep="norepeat">-s</arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<group choice="opt">
|
||||
<arg choice="plain"><option>-1</option></arg>
|
||||
<arg choice="plain"><option>-2</option></arg>
|
||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
</group>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">dnsname</arg>
|
||||
</cmdsynopsis>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
|
||||
<arg choice="req" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat">dnsname</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
||||
</cmdsynopsis>
|
||||
<group choice="opt">
|
||||
<arg choice="plain"><option>-1</option></arg>
|
||||
<arg choice="plain"><option>-2</option></arg>
|
||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
</group>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">-s</arg>
|
||||
<arg choice="req" rep="norepeat">dnsname</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<group choice="opt">
|
||||
<arg choice="plain" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="plain" rep="norepeat"><option>-V</option></arg>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<para><command>dnssec-dsfromkey</command>
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in
|
||||
RFC 3658 and RFC 4509, for the given key(s).
|
||||
<para>
|
||||
The <command>dnssec-dsfromkey</command> command outputs DS (Delegation
|
||||
Signer) resource records (RRs) and other similarly-constructed RRs:
|
||||
with the <option>-l</option> option it outputs DLV (DNSSEC Lookaside
|
||||
Validation) RRs; or with the <option>-C</option> it outputs CDS (Child
|
||||
DS) RRs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The input keys can be specified in a number of ways:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default, <command>dnssec-dsfromkey</command> reads a key file
|
||||
named like <filename>Knnnn.+aaa+iiiii.key</filename>, as generated
|
||||
by <command>dnssec-keygen</command>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
With the <option>-f <replaceable>file</replaceable></option>
|
||||
option, <command>dnssec-dsfromkey</command> reads keys from a zone file
|
||||
or partial zone file (which can contain just the DNSKEY records).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
With the <option>-s</option>
|
||||
option, <command>dnssec-dsfromkey</command> reads
|
||||
a <filename>keyset-</filename> file, as generated
|
||||
by <command>dnssec-keygen</command> <option>-C</option>.
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-1</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use SHA-1 as the digest algorithm (the default is to use
|
||||
both SHA-1 and SHA-256).
|
||||
An abbreviation for <option>-a SHA1</option>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -107,7 +159,7 @@
|
||||
<term>-2</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use SHA-256 as the digest algorithm.
|
||||
An abbreviation for <option>-a SHA-256</option>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -116,40 +168,49 @@
|
||||
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Select the digest algorithm. The value of
|
||||
<option>algorithm</option> must be one of SHA-1 (SHA1),
|
||||
SHA-256 (SHA256), GOST or SHA-384 (SHA384).
|
||||
These values are case insensitive.
|
||||
Specify a digest algorithm to use when converting DNSKEY
|
||||
records to DS records. This option can be repeated, so
|
||||
that multiple DS records are created for each DNSKEY
|
||||
record.
|
||||
</para>
|
||||
<para>
|
||||
The <replaceable>algorithm</replaceable> must be one of
|
||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
||||
and the hyphen may be omitted. If no algorithm is specified,
|
||||
the default is SHA-256.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-A</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Include ZSKs when generating DS records. Without this option, only
|
||||
keys which have the KSK flag set will be converted to DS records
|
||||
and printed. Useful only in <option>-f</option> zone file mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the DNS class (default is IN). Useful only
|
||||
in <option>-s</option> keyset or <option>-f</option>
|
||||
zone file mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-C</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate CDS records rather than DS records. This is mutually
|
||||
exclusive with generating lookaside records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-T <replaceable class="parameter">TTL</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the TTL of the DS records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-K <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Look for key files (or, in keyset mode,
|
||||
<filename>keyset-</filename> files) in
|
||||
<option>directory</option>.
|
||||
Generate CDS records rather than DS records. This is mutually
|
||||
exclusive with the <option>-l</option> option for generating DLV
|
||||
records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -158,13 +219,14 @@
|
||||
<term>-f <replaceable class="parameter">file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Zone file mode: in place of the keyfile name, the argument is
|
||||
the DNS domain name of a zone master file, which can be read
|
||||
Zone file mode: <command>dnssec-dsfromkey</command>'s
|
||||
final <replaceable>dnsname</replaceable> argument is
|
||||
the DNS domain name of a zone whose master file can be read
|
||||
from <option>file</option>. If the zone name is the same as
|
||||
<option>file</option>, then it may be omitted.
|
||||
</para>
|
||||
<para>
|
||||
If <option>file</option> is set to <literal>"-"</literal>, then
|
||||
If <replaceable>file</replaceable> is <literal>"-"</literal>, then
|
||||
the zone data is read from the standard input. This makes it
|
||||
possible to use the output of the <command>dig</command>
|
||||
command as input, as in:
|
||||
@@ -176,26 +238,33 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-A</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Include ZSKs when generating DS records. Without this option,
|
||||
only keys which have the KSK flag set will be converted to DS
|
||||
records and printed. Useful only in zone file mode.
|
||||
</para>
|
||||
</listitem>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints usage information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-K <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Look for key files or <filename>keyset-</filename> files in
|
||||
<option>directory</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<option>domain</option> is appended to the name for each
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<replaceable>domain</replaceable> is appended to the name for each
|
||||
record in the set.
|
||||
The DNSSEC Lookaside Validation (DLV) RR is described
|
||||
in RFC 4431. This is mutually exclusive with generating
|
||||
CDS records.
|
||||
This is mutually exclusive with the <option>-C</option> option
|
||||
for generating CDS records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -204,18 +273,18 @@
|
||||
<term>-s</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Keyset mode: in place of the keyfile name, the argument is
|
||||
the DNS domain name of a keyset file.
|
||||
Keyset mode: <command>dnssec-dsfromkey</command>'s
|
||||
final <replaceable>dnsname</replaceable> argument is the DNS
|
||||
domain name used to locate a <filename>keyset-</filename> file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<term>-T <replaceable class="parameter">TTL</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the DNS class (default is IN). Useful only
|
||||
in keyset or zone file mode.
|
||||
Specifies the TTL of the DS records. By default the TTL is omitted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -229,15 +298,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints usage information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
@@ -254,21 +314,22 @@
|
||||
<para>
|
||||
To build the SHA-256 DS RR from the
|
||||
<userinput>Kexample.com.+003+26160</userinput>
|
||||
keyfile name, the following command would be issued:
|
||||
keyfile name, you can issue the following command:
|
||||
</para>
|
||||
<para><userinput>dnssec-dsfromkey -2 Kexample.com.+003+26160</userinput>
|
||||
</para>
|
||||
<para>
|
||||
The command would print something like:
|
||||
</para>
|
||||
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</userinput>
|
||||
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</userinput>
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>FILES</title></info>
|
||||
|
||||
<para>
|
||||
The keyfile can be designed by the key identification
|
||||
The keyfile can be designated by the key identification
|
||||
<filename>Knnnn.+aaa+iiiii</filename> or the full file name
|
||||
<filename>Knnnn.+aaa+iiiii.key</filename> as generated by
|
||||
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>.
|
||||
@@ -296,9 +357,11 @@
|
||||
<refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
||||
<citetitle>RFC 3658</citetitle>,
|
||||
<citetitle>RFC 4431</citetitle>.
|
||||
<citetitle>RFC 4509</citetitle>.
|
||||
<citetitle>RFC 3658</citetitle> (DS RRs),
|
||||
<citetitle>RFC 4431</citetitle> (DLV RRs),
|
||||
<citetitle>RFC 4509</citetitle> (SHA-256 for DS RRs),
|
||||
<citetitle>RFC 6605</citetitle> (SHA-384 for DS RRs),
|
||||
<citetitle>RFC 7344</citetitle> (CDS and CDNSKEY RRs).
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
|
||||
@@ -33,105 +33,167 @@
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-dsfromkey</code>
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-1</code>]
|
||||
[<code class="option">-2</code>]
|
||||
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
|
||||
[<code class="option">-C</code>]
|
||||
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
|
||||
[
|
||||
<code class="option">-1</code>
|
||||
| <code class="option">-2</code>
|
||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
||||
]
|
||||
[
|
||||
<code class="option">-C</code>
|
||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
||||
]
|
||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||
{keyfile}
|
||||
</p></div>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-dsfromkey</code>
|
||||
{-s}
|
||||
[<code class="option">-1</code>]
|
||||
[<code class="option">-2</code>]
|
||||
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
|
||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
|
||||
[<code class="option">-s</code>]
|
||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||
[
|
||||
<code class="option">-1</code>
|
||||
| <code class="option">-2</code>
|
||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
||||
]
|
||||
[
|
||||
<code class="option">-C</code>
|
||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
||||
]
|
||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||
[<code class="option">-f <em class="replaceable"><code>file</code></em></code>]
|
||||
[<code class="option">-A</code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
{dnsname}
|
||||
</p></div>
|
||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||
[<code class="option">-A</code>]
|
||||
{<code class="option">-f <em class="replaceable"><code>file</code></em></code>}
|
||||
[dnsname]
|
||||
</p></div>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-dsfromkey</code>
|
||||
[<code class="option">-h</code>]
|
||||
[<code class="option">-V</code>]
|
||||
</p></div>
|
||||
[
|
||||
<code class="option">-1</code>
|
||||
| <code class="option">-2</code>
|
||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
||||
]
|
||||
[
|
||||
<code class="option">-C</code>
|
||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
||||
]
|
||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||
{-s}
|
||||
{dnsname}
|
||||
</p></div>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-dsfromkey</code>
|
||||
[
|
||||
<code class="option">-h</code>
|
||||
| <code class="option">-V</code>
|
||||
]
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
|
||||
<p><span class="command"><strong>dnssec-dsfromkey</strong></span>
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in
|
||||
RFC 3658 and RFC 4509, for the given key(s).
|
||||
<p>
|
||||
The <span class="command"><strong>dnssec-dsfromkey</strong></span> command outputs DS (Delegation
|
||||
Signer) resource records (RRs) and other similarly-constructed RRs:
|
||||
with the <code class="option">-l</code> option it outputs DLV (DNSSEC Lookaside
|
||||
Validation) RRs; or with the <code class="option">-C</code> it outputs CDS (Child
|
||||
DS) RRs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The input keys can be specified in a number of ways:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
By default, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads a key file
|
||||
named like <code class="filename">Knnnn.+aaa+iiiii.key</code>, as generated
|
||||
by <span class="command"><strong>dnssec-keygen</strong></span>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
With the <code class="option">-f <em class="replaceable"><code>file</code></em></code>
|
||||
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads keys from a zone file
|
||||
or partial zone file (which can contain just the DNSKEY records).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
With the <code class="option">-s</code>
|
||||
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads
|
||||
a <code class="filename">keyset-</code> file, as generated
|
||||
by <span class="command"><strong>dnssec-keygen</strong></span> <code class="option">-C</code>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
|
||||
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term">-1</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Use SHA-1 as the digest algorithm (the default is to use
|
||||
both SHA-1 and SHA-256).
|
||||
An abbreviation for <code class="option">-a SHA1</code>
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-2</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Use SHA-256 as the digest algorithm.
|
||||
An abbreviation for <code class="option">-a SHA-256</code>
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Select the digest algorithm. The value of
|
||||
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
|
||||
SHA-256 (SHA256), GOST or SHA-384 (SHA384).
|
||||
These values are case insensitive.
|
||||
Specify a digest algorithm to use when converting DNSKEY
|
||||
records to DS records. This option can be repeated, so
|
||||
that multiple DS records are created for each DNSKEY
|
||||
record.
|
||||
</p>
|
||||
<p>
|
||||
The <em class="replaceable"><code>algorithm</code></em> must be one of
|
||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
||||
and the hyphen may be omitted. If no algorithm is specified,
|
||||
the default is SHA-256.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-A</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Include ZSKs when generating DS records. Without this option, only
|
||||
keys which have the KSK flag set will be converted to DS records
|
||||
and printed. Useful only in <code class="option">-f</code> zone file mode.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the DNS class (default is IN). Useful only
|
||||
in <code class="option">-s</code> keyset or <code class="option">-f</code>
|
||||
zone file mode.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-C</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Generate CDS records rather than DS records. This is mutually
|
||||
exclusive with generating lookaside records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the TTL of the DS records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Look for key files (or, in keyset mode,
|
||||
<code class="filename">keyset-</code> files) in
|
||||
<code class="option">directory</code>.
|
||||
Generate CDS records rather than DS records. This is mutually
|
||||
exclusive with the <code class="option">-l</code> option for generating DLV
|
||||
records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Zone file mode: in place of the keyfile name, the argument is
|
||||
the DNS domain name of a zone master file, which can be read
|
||||
Zone file mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s
|
||||
final <em class="replaceable"><code>dnsname</code></em> argument is
|
||||
the DNS domain name of a zone whose master file can be read
|
||||
from <code class="option">file</code>. If the zone name is the same as
|
||||
<code class="option">file</code>, then it may be omitted.
|
||||
</p>
|
||||
<p>
|
||||
If <code class="option">file</code> is set to <code class="literal">"-"</code>, then
|
||||
If <em class="replaceable"><code>file</code></em> is <code class="literal">"-"</code>, then
|
||||
the zone data is read from the standard input. This makes it
|
||||
possible to use the output of the <span class="command"><strong>dig</strong></span>
|
||||
command as input, as in:
|
||||
@@ -140,37 +202,41 @@
|
||||
<strong class="userinput"><code>dig dnskey example.com | dnssec-dsfromkey -f - example.com</code></strong>
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-A</span></dt>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Include ZSKs when generating DS records. Without this option,
|
||||
only keys which have the KSK flag set will be converted to DS
|
||||
records and printed. Useful only in zone file mode.
|
||||
</p>
|
||||
</dd>
|
||||
<p>
|
||||
Prints usage information.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Look for key files or <code class="filename">keyset-</code> files in
|
||||
<code class="option">directory</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<code class="option">domain</code> is appended to the name for each
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<em class="replaceable"><code>domain</code></em> is appended to the name for each
|
||||
record in the set.
|
||||
The DNSSEC Lookaside Validation (DLV) RR is described
|
||||
in RFC 4431. This is mutually exclusive with generating
|
||||
CDS records.
|
||||
This is mutually exclusive with the <code class="option">-C</code> option
|
||||
for generating CDS records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-s</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Keyset mode: in place of the keyfile name, the argument is
|
||||
the DNS domain name of a keyset file.
|
||||
Keyset mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s
|
||||
final <em class="replaceable"><code>dnsname</code></em> argument is the DNS
|
||||
domain name used to locate a <code class="filename">keyset-</code> file.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the DNS class (default is IN). Useful only
|
||||
in keyset or zone file mode.
|
||||
Specifies the TTL of the DS records. By default the TTL is omitted.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||
@@ -179,12 +245,6 @@
|
||||
Sets the debugging level.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Prints usage information.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-V</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -200,22 +260,23 @@
|
||||
<p>
|
||||
To build the SHA-256 DS RR from the
|
||||
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||
keyfile name, the following command would be issued:
|
||||
keyfile name, you can issue the following command:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>dnssec-dsfromkey -2 Kexample.com.+003+26160</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
The command would print something like:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</code></strong>
|
||||
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</code></strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.10"></a><h2>FILES</h2>
|
||||
|
||||
<p>
|
||||
The keyfile can be designed by the key identification
|
||||
The keyfile can be designated by the key identification
|
||||
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
|
||||
<code class="filename">Knnnn.+aaa+iiiii.key</code> as generated by
|
||||
<span class="refentrytitle">dnssec-keygen</span>(8).
|
||||
@@ -245,9 +306,11 @@
|
||||
<span class="refentrytitle">dnssec-signzone</span>(8)
|
||||
</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 3658</em>,
|
||||
<em class="citetitle">RFC 4431</em>.
|
||||
<em class="citetitle">RFC 4509</em>.
|
||||
<em class="citetitle">RFC 3658</em> (DS RRs),
|
||||
<em class="citetitle">RFC 4431</em> (DLV RRs),
|
||||
<em class="citetitle">RFC 4509</em> (SHA-256 for DS RRs),
|
||||
<em class="citetitle">RFC 6605</em> (SHA-384 for DS RRs),
|
||||
<em class="citetitle">RFC 7344</em> (CDS and CDNSKEY RRs).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -674,10 +674,10 @@ main(int argc, char **argv) {
|
||||
|
||||
if (setdel)
|
||||
dst_key_settime(key, DST_TIME_DELETE, deltime);
|
||||
if (setsyncadd)
|
||||
dst_key_settime(key, DST_TIME_SYNCPUBLISH, syncadd);
|
||||
if (setsyncdel)
|
||||
dst_key_settime(key, DST_TIME_SYNCDELETE, syncdel);
|
||||
if (setsyncadd)
|
||||
dst_key_settime(key, DST_TIME_SYNCPUBLISH, syncadd);
|
||||
if (setsyncdel)
|
||||
dst_key_settime(key, DST_TIME_SYNCDELETE, syncdel);
|
||||
|
||||
} else {
|
||||
if (setpub || setact || setrev || setinact ||
|
||||
|
||||
@@ -61,13 +61,13 @@ usage(void) {
|
||||
#else
|
||||
fprintf(stderr, " -E engine: specify OpenSSL engine\n");
|
||||
#endif
|
||||
fprintf(stderr, " -f: force overwrite\n");
|
||||
fprintf(stderr, " -f: force overwrite\n");
|
||||
fprintf(stderr, " -h: help\n");
|
||||
fprintf(stderr, " -K directory: use directory for key files\n");
|
||||
fprintf(stderr, " -h: help\n");
|
||||
fprintf(stderr, " -r: remove old keyfiles after "
|
||||
fprintf(stderr, " -r: remove old keyfiles after "
|
||||
"creating revoked version\n");
|
||||
fprintf(stderr, " -v level: set level of verbosity\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, " -v level: set level of verbosity\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, "Output:\n");
|
||||
fprintf(stderr, " K<name>+<alg>+<new id>.key, "
|
||||
"K<name>+<alg>+<new id>.private\n");
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "dnssectool"=".\dnssectool.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "dnssectool"=".\dnssectool.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
@@ -198,6 +198,25 @@
|
||||
background-color: #99ddff;
|
||||
}
|
||||
|
||||
table.zones {
|
||||
border: 1px solid grey;
|
||||
width: 500px;
|
||||
}
|
||||
table.zones th {
|
||||
text-align: center;
|
||||
border: 1px solid grey;
|
||||
}
|
||||
table.zones td {
|
||||
text-align: center;
|
||||
font-family: monospace;
|
||||
}
|
||||
table.zones td:nth-child(1) {
|
||||
text-align: right;
|
||||
}
|
||||
table.zones td:nth-child(4) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.totals {
|
||||
background-color: rgb(1,169,206);
|
||||
color: #ffffff;
|
||||
@@ -705,6 +724,35 @@
|
||||
</table>
|
||||
<br/>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="views/view">
|
||||
<xsl:if test="zones/zone">
|
||||
<h3>Zones for View <xsl:value-of select="@name"/></h3>
|
||||
<table class="zones">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Class</th>
|
||||
<th>Type</th>
|
||||
<th>Serial</th>
|
||||
</tr>
|
||||
<xsl:for-each select="zones/zone">
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="@name"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="@rdataclass"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="type"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="serial"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="views/view[zones/zone/counters[@type="qtype"]/counter >0]">
|
||||
<h2>Received QTYPES per view/zone</h2>
|
||||
<xsl:for-each select="views/view[zones/zone/counters[@type="qtype"]/counter >0]">
|
||||
|
||||
@@ -203,6 +203,25 @@ static char xslmsg[] =
|
||||
" background-color: #99ddff;\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" table.zones {\n"
|
||||
" border: 1px solid grey;\n"
|
||||
" width: 500px;\n"
|
||||
" }\n"
|
||||
" table.zones th {\n"
|
||||
" text-align: center;\n"
|
||||
" border: 1px solid grey;\n"
|
||||
" }\n"
|
||||
" table.zones td {\n"
|
||||
" text-align: center;\n"
|
||||
" font-family: monospace;\n"
|
||||
" }\n"
|
||||
" table.zones td:nth-child(1) {\n"
|
||||
" text-align: right;\n"
|
||||
" }\n"
|
||||
" table.zones td:nth-child(4) {\n"
|
||||
" text-align: right;\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" .totals {\n"
|
||||
" background-color: rgb(1,169,206);\n"
|
||||
" color: #ffffff;\n"
|
||||
@@ -710,6 +729,35 @@ static char xslmsg[] =
|
||||
" </table>\n"
|
||||
" <br/>\n"
|
||||
" </xsl:if>\n"
|
||||
" <xsl:for-each select=\"views/view\">\n"
|
||||
" <xsl:if test=\"zones/zone\">\n"
|
||||
" <h3>Zones for View <xsl:value-of select=\"@name\"/></h3>\n"
|
||||
" <table class=\"zones\">\n"
|
||||
" <tr>\n"
|
||||
" <th>Name</th>\n"
|
||||
" <th>Class</th>\n"
|
||||
" <th>Type</th>\n"
|
||||
" <th>Serial</th>\n"
|
||||
" </tr>\n"
|
||||
" <xsl:for-each select=\"zones/zone\">\n"
|
||||
" <tr>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"@name\"/>\n"
|
||||
" </td>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"@rdataclass\"/>\n"
|
||||
" </td>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"type\"/>\n"
|
||||
" </td>\n"
|
||||
" <td>\n"
|
||||
" <xsl:value-of select=\"serial\"/>\n"
|
||||
" </td>\n"
|
||||
" </tr>\n"
|
||||
" </xsl:for-each>\n"
|
||||
" </table>\n"
|
||||
" </xsl:if>\n"
|
||||
" </xsl:for-each>\n"
|
||||
" <xsl:if test=\"views/view[zones/zone/counters[@type="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"
|
||||
|
||||
+349
-99
@@ -246,10 +246,11 @@ static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
|
||||
static isc_result_t get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
|
||||
dns_dispatch_t *disp, bool tcp);
|
||||
static isc_result_t get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp,
|
||||
isc_socket_t *sock);
|
||||
isc_socket_t *sock, ns_client_t *oldclient);
|
||||
static inline bool
|
||||
allowed(isc_netaddr_t *addr, dns_name_t *signer, isc_netaddr_t *ecs_addr,
|
||||
uint8_t ecs_addrlen, uint8_t *ecs_scope, dns_acl_t *acl);
|
||||
allowed(isc_netaddr_t *addr, dns_name_t *signer,
|
||||
isc_netaddr_t *ecs_addr, uint8_t ecs_addrlen,
|
||||
uint8_t *ecs_scope, dns_acl_t *acl);
|
||||
static void compute_cookie(ns_client_t *client, uint32_t when,
|
||||
uint32_t nonce, const unsigned char *secret,
|
||||
isc_buffer_t *buf);
|
||||
@@ -298,6 +299,119 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* Allocate a reference-counted object that will maintain a single pointer to
|
||||
* the (also reference-counted) TCP client quota, shared between all the
|
||||
* clients processing queries on a single TCP connection, so that all
|
||||
* clients sharing the one socket will together consume only one slot in
|
||||
* the 'tcp-clients' quota.
|
||||
*/
|
||||
static isc_result_t
|
||||
tcpconn_init(ns_client_t *client, bool force) {
|
||||
isc_result_t result;
|
||||
isc_quota_t *quota = NULL;
|
||||
ns_tcpconn_t *tconn = NULL;
|
||||
|
||||
REQUIRE(client->tcpconn == NULL);
|
||||
|
||||
/*
|
||||
* Try to attach to the quota first, so we won't pointlessly
|
||||
* allocate memory for a tcpconn object if we can't get one.
|
||||
*/
|
||||
if (force) {
|
||||
result = isc_quota_force(&ns_g_server->tcpquota, "a);
|
||||
} else {
|
||||
result = isc_quota_attach(&ns_g_server->tcpquota, "a);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
* A global memory context is used for the allocation as different
|
||||
* client structures may have different memory contexts assigned and a
|
||||
* reference counter allocated here might need to be freed by a
|
||||
* different client. The performance impact caused by memory context
|
||||
* contention here is expected to be negligible, given that this code
|
||||
* is only executed for TCP connections.
|
||||
*/
|
||||
tconn = isc_mem_allocate(ns_g_mctx, sizeof(*tconn));
|
||||
|
||||
isc_refcount_init(&tconn->refs, 1);
|
||||
tconn->tcpquota = quota;
|
||||
quota = NULL;
|
||||
tconn->pipelined = false;
|
||||
|
||||
client->tcpconn = tconn;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*%
|
||||
* Increase the count of client structures sharing the TCP connection
|
||||
* that 'source' is associated with; add a pointer to the same tcpconn
|
||||
* to 'target', thus associating it with the same TCP connection.
|
||||
*/
|
||||
static void
|
||||
tcpconn_attach(ns_client_t *source, ns_client_t *target) {
|
||||
int refs;
|
||||
|
||||
REQUIRE(source->tcpconn != NULL);
|
||||
REQUIRE(target->tcpconn == NULL);
|
||||
REQUIRE(source->tcpconn->pipelined);
|
||||
|
||||
isc_refcount_increment(&source->tcpconn->refs, &refs);
|
||||
INSIST(refs > 1);
|
||||
target->tcpconn = source->tcpconn;
|
||||
}
|
||||
|
||||
/*%
|
||||
* Decrease the count of client structures sharing the TCP connection that
|
||||
* 'client' is associated with. If this is the last client using this TCP
|
||||
* connection, we detach from the TCP quota and free the tcpconn
|
||||
* object. Either way, client->tcpconn is set to NULL.
|
||||
*/
|
||||
static void
|
||||
tcpconn_detach(ns_client_t *client) {
|
||||
ns_tcpconn_t *tconn = NULL;
|
||||
int refs;
|
||||
|
||||
REQUIRE(client->tcpconn != NULL);
|
||||
|
||||
tconn = client->tcpconn;
|
||||
client->tcpconn = NULL;
|
||||
|
||||
isc_refcount_decrement(&tconn->refs, &refs);
|
||||
if (refs == 0) {
|
||||
isc_quota_detach(&tconn->tcpquota);
|
||||
isc_mem_free(ns_g_mctx, tconn);
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* Mark a client as active and increment the interface's 'ntcpactive'
|
||||
* counter, as a signal that there is at least one client servicing
|
||||
* TCP queries for the interface. If we reach the TCP client quota at
|
||||
* some point, this will be used to determine whether a quota overrun
|
||||
* should be permitted.
|
||||
*
|
||||
* Marking the client active with the 'tcpactive' flag ensures proper
|
||||
* accounting, by preventing us from incrementing or decrementing
|
||||
* 'ntcpactive' more than once per client.
|
||||
*/
|
||||
static void
|
||||
mark_tcp_active(ns_client_t *client, bool active) {
|
||||
if (active && !client->tcpactive) {
|
||||
isc_atomic_xadd(&client->interface->ntcpactive, 1);
|
||||
client->tcpactive = active;
|
||||
} else if (!active && client->tcpactive) {
|
||||
uint32_t old =
|
||||
isc_atomic_xadd(&client->interface->ntcpactive, -1);
|
||||
INSIST(old > 0);
|
||||
client->tcpactive = active;
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* Check for a deactivation or shutdown request and take appropriate
|
||||
* action. Returns true if either is in progress; in this case
|
||||
@@ -387,7 +501,8 @@ exit_check(ns_client_t *client) {
|
||||
INSIST(client->recursionquota == NULL);
|
||||
|
||||
if (NS_CLIENTSTATE_READING == client->newstate) {
|
||||
if (!client->pipelined) {
|
||||
INSIST(client->tcpconn != NULL);
|
||||
if (!client->tcpconn->pipelined) {
|
||||
client_read(client);
|
||||
client->newstate = NS_CLIENTSTATE_MAX;
|
||||
return (true); /* We're done. */
|
||||
@@ -405,10 +520,13 @@ exit_check(ns_client_t *client) {
|
||||
*/
|
||||
INSIST(client->recursionquota == NULL);
|
||||
INSIST(client->newstate <= NS_CLIENTSTATE_READY);
|
||||
if (client->nreads > 0)
|
||||
|
||||
if (client->nreads > 0) {
|
||||
dns_tcpmsg_cancelread(&client->tcpmsg);
|
||||
if (client->nreads != 0) {
|
||||
/* Still waiting for read cancel completion. */
|
||||
}
|
||||
|
||||
/* Still waiting for read cancel completion. */
|
||||
if (client->nreads > 0) {
|
||||
return (true);
|
||||
}
|
||||
|
||||
@@ -416,14 +534,49 @@ exit_check(ns_client_t *client) {
|
||||
dns_tcpmsg_invalidate(&client->tcpmsg);
|
||||
client->tcpmsg_valid = false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Soon the client will be ready to accept a new TCP
|
||||
* connection or UDP request, but we may have enough
|
||||
* clients doing that already. Check whether this client
|
||||
* needs to remain active and allow it go inactive if
|
||||
* not.
|
||||
*
|
||||
* UDP clients always go inactive at this point, but a TCP
|
||||
* client may need to stay active and return to READY
|
||||
* state if no other clients are available to listen
|
||||
* for TCP requests on this interface.
|
||||
*
|
||||
* Regardless, if we're going to FREED state, that means
|
||||
* the system is shutting down and we don't need to
|
||||
* retain clients.
|
||||
*/
|
||||
if (client->mortal && TCP_CLIENT(client) &&
|
||||
client->newstate != NS_CLIENTSTATE_FREED &&
|
||||
!ns_g_clienttest &&
|
||||
isc_atomic_xadd(&client->interface->ntcpaccepting, 0) == 0)
|
||||
{
|
||||
/* Nobody else is accepting */
|
||||
client->mortal = false;
|
||||
client->newstate = NS_CLIENTSTATE_READY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Detach from TCP connection and TCP client quota,
|
||||
* if appropriate. If this is the last reference to
|
||||
* the TCP connection in our pipeline group, the
|
||||
* TCP quota slot will be released.
|
||||
*/
|
||||
if (client->tcpconn) {
|
||||
tcpconn_detach(client);
|
||||
}
|
||||
|
||||
if (client->tcpsocket != NULL) {
|
||||
CTRACE("closetcp");
|
||||
isc_socket_detach(&client->tcpsocket);
|
||||
mark_tcp_active(client, false);
|
||||
}
|
||||
|
||||
if (client->tcpquota != NULL)
|
||||
isc_quota_detach(&client->tcpquota);
|
||||
|
||||
if (client->timerset) {
|
||||
(void)isc_timer_reset(client->timer,
|
||||
isc_timertype_inactive,
|
||||
@@ -431,45 +584,26 @@ exit_check(ns_client_t *client) {
|
||||
client->timerset = false;
|
||||
}
|
||||
|
||||
client->pipelined = false;
|
||||
|
||||
client->peeraddr_valid = false;
|
||||
|
||||
client->state = NS_CLIENTSTATE_READY;
|
||||
INSIST(client->recursionquota == NULL);
|
||||
|
||||
/*
|
||||
* Now the client is ready to accept a new TCP connection
|
||||
* or UDP request, but we may have enough clients doing
|
||||
* that already. Check whether this client needs to remain
|
||||
* active and force it to go inactive if not.
|
||||
*
|
||||
* UDP clients go inactive at this point, but TCP clients
|
||||
* may remain active if we have fewer active TCP client
|
||||
* objects than desired due to an earlier quota exhaustion.
|
||||
*/
|
||||
if (client->mortal && TCP_CLIENT(client) && !ns_g_clienttest) {
|
||||
LOCK(&client->interface->lock);
|
||||
if (client->interface->ntcpcurrent <
|
||||
client->interface->ntcptarget)
|
||||
client->mortal = false;
|
||||
UNLOCK(&client->interface->lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't need the client; send it to the inactive
|
||||
* queue for recycling.
|
||||
*/
|
||||
if (client->mortal) {
|
||||
if (client->newstate > NS_CLIENTSTATE_INACTIVE)
|
||||
if (client->newstate > NS_CLIENTSTATE_INACTIVE) {
|
||||
client->newstate = NS_CLIENTSTATE_INACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_CLIENTSTATE_READY == client->newstate) {
|
||||
if (TCP_CLIENT(client)) {
|
||||
client_accept(client);
|
||||
} else
|
||||
} else {
|
||||
client_udprecv(client);
|
||||
}
|
||||
client->newstate = NS_CLIENTSTATE_MAX;
|
||||
return (true);
|
||||
}
|
||||
@@ -481,41 +615,50 @@ exit_check(ns_client_t *client) {
|
||||
/*
|
||||
* We are trying to enter the inactive state.
|
||||
*/
|
||||
if (client->naccepts > 0)
|
||||
if (client->naccepts > 0) {
|
||||
isc_socket_cancel(client->tcplistener, client->task,
|
||||
ISC_SOCKCANCEL_ACCEPT);
|
||||
}
|
||||
|
||||
/* Still waiting for accept cancel completion. */
|
||||
if (! (client->naccepts == 0))
|
||||
if (client->naccepts > 0) {
|
||||
return (true);
|
||||
}
|
||||
|
||||
/* Accept cancel is complete. */
|
||||
if (client->nrecvs > 0)
|
||||
if (client->nrecvs > 0) {
|
||||
isc_socket_cancel(client->udpsocket, client->task,
|
||||
ISC_SOCKCANCEL_RECV);
|
||||
}
|
||||
|
||||
/* Still waiting for recv cancel completion. */
|
||||
if (! (client->nrecvs == 0))
|
||||
if (client->nrecvs > 0) {
|
||||
return (true);
|
||||
}
|
||||
|
||||
/* Still waiting for control event to be delivered */
|
||||
if (client->nctls > 0)
|
||||
if (client->nctls > 0) {
|
||||
return (true);
|
||||
|
||||
/* Deactivate the client. */
|
||||
if (client->interface)
|
||||
ns_interface_detach(&client->interface);
|
||||
}
|
||||
|
||||
INSIST(client->naccepts == 0);
|
||||
INSIST(client->recursionquota == NULL);
|
||||
if (client->tcplistener != NULL)
|
||||
if (client->tcplistener != NULL) {
|
||||
isc_socket_detach(&client->tcplistener);
|
||||
|
||||
if (client->udpsocket != NULL)
|
||||
mark_tcp_active(client, false);
|
||||
}
|
||||
if (client->udpsocket != NULL) {
|
||||
isc_socket_detach(&client->udpsocket);
|
||||
}
|
||||
|
||||
if (client->dispatch != NULL)
|
||||
/* Deactivate the client. */
|
||||
if (client->interface != NULL) {
|
||||
ns_interface_detach(&client->interface);
|
||||
}
|
||||
|
||||
if (client->dispatch != NULL) {
|
||||
dns_dispatch_detach(&client->dispatch);
|
||||
}
|
||||
|
||||
client->attributes = 0;
|
||||
client->mortal = false;
|
||||
@@ -540,10 +683,13 @@ exit_check(ns_client_t *client) {
|
||||
client->newstate = NS_CLIENTSTATE_MAX;
|
||||
if (!ns_g_clienttest && manager != NULL &&
|
||||
!manager->exiting)
|
||||
{
|
||||
ISC_QUEUE_PUSH(manager->inactive, client,
|
||||
ilink);
|
||||
if (client->needshutdown)
|
||||
}
|
||||
if (client->needshutdown) {
|
||||
isc_task_shutdown(client->task);
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
@@ -617,6 +763,7 @@ exit_check(ns_client_t *client) {
|
||||
if (ns_g_clienttest && isc_mem_references(client->mctx) != 1) {
|
||||
isc_mem_stats(client->mctx, stderr);
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -653,7 +800,7 @@ client_start(isc_task_t *task, isc_event_t *event) {
|
||||
return;
|
||||
|
||||
if (TCP_CLIENT(client)) {
|
||||
if (client->pipelined) {
|
||||
if (client->tcpconn != NULL) {
|
||||
client_read(client);
|
||||
} else {
|
||||
client_accept(client);
|
||||
@@ -663,7 +810,6 @@ client_start(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*%
|
||||
* The client's task has received a shutdown event.
|
||||
*/
|
||||
@@ -1230,7 +1376,7 @@ client_send(ns_client_t *client) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
respsize = isc_buffer_usedlength(&buffer);
|
||||
@@ -1256,7 +1402,7 @@ client_send(ns_client_t *client) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1638,7 +1784,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
|
||||
isc_buffer_t buf;
|
||||
uint8_t addr[16];
|
||||
uint32_t plen, addrl;
|
||||
uint16_t family;
|
||||
uint16_t family = 0;
|
||||
|
||||
/* Add CLIENT-SUBNET option. */
|
||||
|
||||
@@ -1664,6 +1810,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_buffer_init(&buf, ecs, sizeof(ecs));
|
||||
@@ -1851,6 +1998,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
isc_hmacsha1_update(&hmacsha1, cp, length);
|
||||
isc_hmacsha1_sign(&hmacsha1, digest, sizeof(digest));
|
||||
@@ -1886,6 +2034,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
isc_hmacsha256_update(&hmacsha256, cp, length);
|
||||
isc_hmacsha256_sign(&hmacsha256, digest, sizeof(digest));
|
||||
@@ -1895,6 +2044,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
|
||||
}
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2304,6 +2454,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
client->nrecvs--;
|
||||
} else {
|
||||
INSIST(TCP_CLIENT(client));
|
||||
INSIST(client->tcpconn != NULL);
|
||||
REQUIRE(event->ev_type == DNS_EVENT_TCPMSG);
|
||||
REQUIRE(event->ev_sender == &client->tcpmsg);
|
||||
buffer = &client->tcpmsg.buffer;
|
||||
@@ -2445,7 +2596,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
switch (isc_sockaddr_pf(&client->peeraddr)) {
|
||||
@@ -2459,7 +2610,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2472,14 +2623,18 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
* Parsing the request failed. Send a response
|
||||
* (typically FORMERR or SERVFAIL).
|
||||
*/
|
||||
if (result == DNS_R_OPTERR)
|
||||
if (result == DNS_R_OPTERR) {
|
||||
(void)ns_client_addopt(client, client->message,
|
||||
&client->opt);
|
||||
}
|
||||
|
||||
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
|
||||
"message parsing failed: %s",
|
||||
isc_result_totext(result));
|
||||
if (result == ISC_R_NOSPACE) {
|
||||
result = DNS_R_FORMERR;
|
||||
}
|
||||
ns_client_error(client, result);
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -2487,18 +2642,27 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
/*
|
||||
* Pipeline TCP query processing.
|
||||
*/
|
||||
if (client->message->opcode != dns_opcode_query)
|
||||
client->pipelined = false;
|
||||
if (TCP_CLIENT(client) && client->pipelined) {
|
||||
result = isc_quota_reserve(&ns_g_server->tcpquota);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = ns_client_replace(client);
|
||||
if (TCP_CLIENT(client) &&
|
||||
client->message->opcode != dns_opcode_query)
|
||||
{
|
||||
client->tcpconn->pipelined = false;
|
||||
}
|
||||
if (TCP_CLIENT(client) && client->tcpconn->pipelined) {
|
||||
/*
|
||||
* We're pipelining. Replace the client; the
|
||||
* replacement can read the TCP socket looking
|
||||
* for new messages and this one can process the
|
||||
* current message asynchronously.
|
||||
*
|
||||
* There will now be at least three clients using this
|
||||
* TCP socket - one accepting new connections,
|
||||
* one reading an existing connection to get new
|
||||
* messages, and one answering the message already
|
||||
* received.
|
||||
*/
|
||||
result = ns_client_replace(client);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
|
||||
"no more TCP clients(read): %s",
|
||||
isc_result_totext(result));
|
||||
client->pipelined = false;
|
||||
client->tcpconn->pipelined = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3054,8 +3218,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
client->signer = NULL;
|
||||
dns_name_init(&client->signername, NULL);
|
||||
client->mortal = false;
|
||||
client->pipelined = false;
|
||||
client->tcpquota = NULL;
|
||||
client->tcpconn = NULL;
|
||||
client->recursionquota = NULL;
|
||||
client->interface = NULL;
|
||||
client->peeraddr_valid = false;
|
||||
@@ -3065,6 +3228,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
|
||||
client->filter_aaaa = dns_aaaa_ok;
|
||||
#endif
|
||||
client->needshutdown = ns_g_clienttest;
|
||||
client->tcpactive = false;
|
||||
|
||||
ISC_EVENT_INIT(&client->ctlevent, sizeof(client->ctlevent), 0, NULL,
|
||||
NS_EVENT_CLIENTCONTROL, client_start, client, client,
|
||||
@@ -3159,9 +3323,10 @@ client_read(ns_client_t *client) {
|
||||
|
||||
static void
|
||||
client_newconn(isc_task_t *task, isc_event_t *event) {
|
||||
isc_result_t result;
|
||||
ns_client_t *client = event->ev_arg;
|
||||
isc_socket_newconnev_t *nevent = (isc_socket_newconnev_t *)event;
|
||||
isc_result_t result;
|
||||
uint32_t old;
|
||||
|
||||
REQUIRE(event->ev_type == ISC_SOCKEVENT_NEWCONN);
|
||||
REQUIRE(NS_CLIENT_VALID(client));
|
||||
@@ -3171,13 +3336,18 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
INSIST(client->state == NS_CLIENTSTATE_READY);
|
||||
|
||||
/*
|
||||
* The accept() was successful and we're now establishing a new
|
||||
* connection. We need to make note of it in the client and
|
||||
* interface objects so client objects can do the right thing
|
||||
* when going inactive in exit_check() (see comments in
|
||||
* client_accept() for details).
|
||||
*/
|
||||
INSIST(client->naccepts == 1);
|
||||
client->naccepts--;
|
||||
|
||||
LOCK(&client->interface->lock);
|
||||
INSIST(client->interface->ntcpcurrent > 0);
|
||||
client->interface->ntcpcurrent--;
|
||||
UNLOCK(&client->interface->lock);
|
||||
old = isc_atomic_xadd(&client->interface->ntcpaccepting, -1);
|
||||
INSIST(old > 0);
|
||||
|
||||
/*
|
||||
* We must take ownership of the new socket before the exit
|
||||
@@ -3210,6 +3380,7 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
|
||||
"accept failed: %s",
|
||||
isc_result_totext(nevent->result));
|
||||
tcpconn_detach(client);
|
||||
}
|
||||
|
||||
if (exit_check(client))
|
||||
@@ -3247,20 +3418,13 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
|
||||
* telnetting to port 53 (once per CPU) will
|
||||
* deny service to legitimate TCP clients.
|
||||
*/
|
||||
client->pipelined = false;
|
||||
result = isc_quota_attach(&ns_g_server->tcpquota,
|
||||
&client->tcpquota);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = ns_client_replace(client);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
|
||||
"no more TCP clients(accept): %s",
|
||||
isc_result_totext(result));
|
||||
} else if (ns_g_server->keepresporder == NULL ||
|
||||
!allowed(&netaddr, NULL, NULL, 0, NULL,
|
||||
ns_g_server->keepresporder)) {
|
||||
client->pipelined = true;
|
||||
result = ns_client_replace(client);
|
||||
if (result == ISC_R_SUCCESS &&
|
||||
(ns_g_server->keepresporder == NULL ||
|
||||
!allowed(&netaddr, NULL, NULL, 0, NULL,
|
||||
ns_g_server->keepresporder)))
|
||||
{
|
||||
client->tcpconn->pipelined = true;
|
||||
}
|
||||
|
||||
client_read(client);
|
||||
@@ -3276,12 +3440,66 @@ client_accept(ns_client_t *client) {
|
||||
|
||||
CTRACE("accept");
|
||||
|
||||
/*
|
||||
* Set up a new TCP connection. This means try to attach to the
|
||||
* TCP client quota (tcp-clients), but fail if we're over quota.
|
||||
*/
|
||||
result = tcpconn_init(client, false);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
bool exit;
|
||||
|
||||
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_WARNING,
|
||||
"TCP client quota reached: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
/*
|
||||
* We have exceeded the system-wide TCP client quota. But,
|
||||
* we can't just block this accept in all cases, because if
|
||||
* we did, a heavy TCP load on other interfaces might cause
|
||||
* this interface to be starved, with no clients able to
|
||||
* accept new connections.
|
||||
*
|
||||
* So, we check here to see if any other clients are
|
||||
* already servicing TCP queries on this interface (whether
|
||||
* accepting, reading, or processing). If we find that at
|
||||
* least one client other than this one is active, then
|
||||
* it's okay *not* to call accept - we can let this
|
||||
* client go inactive and another will take over when it's
|
||||
* done.
|
||||
*
|
||||
* If there aren't enough active clients on the interface,
|
||||
* then we can be a little bit flexible about the quota.
|
||||
* We'll allow *one* extra client through to ensure we're
|
||||
* listening on every interface; we do this by setting the
|
||||
* 'force' option to tcpconn_init().
|
||||
*
|
||||
* (Note: In practice this means that the real TCP client
|
||||
* quota is tcp-clients plus the number of listening
|
||||
* interfaces plus 1.)
|
||||
*/
|
||||
exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) >
|
||||
(client->tcpactive ? 1 : 0));
|
||||
if (exit) {
|
||||
client->newstate = NS_CLIENTSTATE_INACTIVE;
|
||||
(void)exit_check(client);
|
||||
return;
|
||||
}
|
||||
|
||||
result = tcpconn_init(client, true);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* If this client was set up using get_client() or get_worker(),
|
||||
* then TCP is already marked active. However, if it was restarted
|
||||
* from exit_check(), it might not be, so we take care of it now.
|
||||
*/
|
||||
mark_tcp_active(client, true);
|
||||
|
||||
result = isc_socket_accept(client->tcplistener, client->task,
|
||||
client_newconn, client);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_socket_accept() failed: %s",
|
||||
isc_result_totext(result));
|
||||
/*
|
||||
* XXXRTH What should we do? We're trying to accept but
|
||||
* it didn't work. If we just give up, then TCP
|
||||
@@ -3289,13 +3507,37 @@ client_accept(ns_client_t *client) {
|
||||
*
|
||||
* For now, we just go idle.
|
||||
*/
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_socket_accept() failed: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
tcpconn_detach(client);
|
||||
mark_tcp_active(client, false);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The client's 'naccepts' counter indicates that this client has
|
||||
* called accept() and is waiting for a new connection. It should
|
||||
* never exceed 1.
|
||||
*/
|
||||
INSIST(client->naccepts == 0);
|
||||
client->naccepts++;
|
||||
LOCK(&client->interface->lock);
|
||||
client->interface->ntcpcurrent++;
|
||||
UNLOCK(&client->interface->lock);
|
||||
|
||||
/*
|
||||
* The interface's 'ntcpaccepting' counter is incremented when
|
||||
* any client calls accept(), and decremented in client_newconn()
|
||||
* once the connection is established.
|
||||
*
|
||||
* When the client object is shutting down after handling a TCP
|
||||
* request (see exit_check()), if this value is at least one, that
|
||||
* means another client has called accept() and is waiting to
|
||||
* establish the next connection. That means the client may be
|
||||
* be free to become inactive; otherwise it may need to start
|
||||
* listening for connections itself to prevent the interface
|
||||
* going dead.
|
||||
*/
|
||||
isc_atomic_xadd(&client->interface->ntcpaccepting, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3366,15 +3608,17 @@ ns_client_replace(ns_client_t *client) {
|
||||
REQUIRE(client->manager != NULL);
|
||||
|
||||
tcp = TCP_CLIENT(client);
|
||||
if (tcp && client->pipelined) {
|
||||
if (tcp && client->tcpconn != NULL && client->tcpconn->pipelined) {
|
||||
result = get_worker(client->manager, client->interface,
|
||||
client->tcpsocket);
|
||||
client->tcpsocket, client);
|
||||
} else {
|
||||
result = get_client(client->manager, client->interface,
|
||||
client->dispatch, tcp);
|
||||
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
* The responsibility for listening for new requests is hereby
|
||||
@@ -3560,9 +3804,12 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
|
||||
client->dscp = ifp->dscp;
|
||||
|
||||
if (tcp) {
|
||||
mark_tcp_active(client, true);
|
||||
|
||||
client->attributes |= NS_CLIENTATTR_TCP;
|
||||
isc_socket_attach(ifp->tcpsocket,
|
||||
&client->tcplistener);
|
||||
|
||||
} else {
|
||||
isc_socket_t *sock;
|
||||
|
||||
@@ -3580,7 +3827,8 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
|
||||
get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock,
|
||||
ns_client_t *oldclient)
|
||||
{
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_event_t *ev;
|
||||
@@ -3588,6 +3836,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
|
||||
MTRACE("get worker");
|
||||
|
||||
REQUIRE(manager != NULL);
|
||||
REQUIRE(oldclient != NULL);
|
||||
|
||||
if (manager->exiting)
|
||||
return (ISC_R_SHUTTINGDOWN);
|
||||
@@ -3620,14 +3869,15 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock)
|
||||
ns_interface_attach(ifp, &client->interface);
|
||||
client->newstate = client->state = NS_CLIENTSTATE_WORKING;
|
||||
INSIST(client->recursionquota == NULL);
|
||||
client->tcpquota = &ns_g_server->tcpquota;
|
||||
|
||||
client->dscp = ifp->dscp;
|
||||
|
||||
client->attributes |= NS_CLIENTATTR_TCP;
|
||||
client->pipelined = true;
|
||||
client->mortal = true;
|
||||
|
||||
tcpconn_attach(oldclient, client);
|
||||
mark_tcp_active(client, true);
|
||||
|
||||
isc_socket_attach(ifp->tcpsocket, &client->tcplistener);
|
||||
isc_socket_attach(sock, &client->tcpsocket);
|
||||
isc_socket_setname(client->tcpsocket, "worker-tcp", NULL);
|
||||
|
||||
+9
-6
@@ -423,18 +423,20 @@ ns_config_getzonetype(const cfg_obj_t *zonetypeobj) {
|
||||
const char *str;
|
||||
|
||||
str = cfg_obj_asstring(zonetypeobj);
|
||||
if (strcasecmp(str, "master") == 0)
|
||||
if (strcasecmp(str, "master") == 0) {
|
||||
ztype = dns_zone_master;
|
||||
else if (strcasecmp(str, "slave") == 0)
|
||||
} else if (strcasecmp(str, "slave") == 0) {
|
||||
ztype = dns_zone_slave;
|
||||
else if (strcasecmp(str, "stub") == 0)
|
||||
} else if (strcasecmp(str, "stub") == 0) {
|
||||
ztype = dns_zone_stub;
|
||||
else if (strcasecmp(str, "static-stub") == 0)
|
||||
} else if (strcasecmp(str, "static-stub") == 0) {
|
||||
ztype = dns_zone_staticstub;
|
||||
else if (strcasecmp(str, "redirect") == 0)
|
||||
} else if (strcasecmp(str, "redirect") == 0) {
|
||||
ztype = dns_zone_redirect;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
return (ztype);
|
||||
}
|
||||
|
||||
@@ -1008,6 +1010,7 @@ ns_config_getkeyalgorithm2(const char *str, dns_name_t **name,
|
||||
case hmacsha512: *name = dns_tsig_hmacsha512_name; break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (typep != NULL)
|
||||
|
||||
+65
-60
@@ -116,7 +116,8 @@ ns_control_docommand(isccc_sexpr_t *message, bool readonly,
|
||||
/*
|
||||
* Compare the 'command' parameter against all known control commands.
|
||||
*/
|
||||
if (command_compare(command, NS_COMMAND_NULL) ||
|
||||
if ((command_compare(command, NS_COMMAND_NULL) &&
|
||||
strlen(cmdline) == 4) ||
|
||||
command_compare(command, NS_COMMAND_STATUS))
|
||||
{
|
||||
log_level = ISC_LOG_DEBUG(1);
|
||||
@@ -150,16 +151,11 @@ ns_control_docommand(isccc_sexpr_t *message, bool readonly,
|
||||
"received control channel command '%s'",
|
||||
cmdline);
|
||||
|
||||
if (command_compare(command, NS_COMMAND_RELOAD)) {
|
||||
result = ns_server_reloadcommand(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_RECONFIG)) {
|
||||
result = ns_server_reconfigcommand(ns_g_server);
|
||||
} else if (command_compare(command, NS_COMMAND_REFRESH)) {
|
||||
result = ns_server_refreshcommand(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_RETRANSFER)) {
|
||||
result = ns_server_retransfercommand(ns_g_server,
|
||||
lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_HALT)) {
|
||||
/*
|
||||
* After the lengthy "halt" and "stop", the commands are
|
||||
* handled in alphabetical order of the NS_COMMAND_ macros.
|
||||
*/
|
||||
if (command_compare(command, NS_COMMAND_HALT)) {
|
||||
#ifdef HAVE_LIBSCF
|
||||
/*
|
||||
* If we are managed by smf(5), AND in chroot, then
|
||||
@@ -204,79 +200,88 @@ ns_control_docommand(isccc_sexpr_t *message, bool readonly,
|
||||
ns_os_shutdownmsg(cmdline, *text);
|
||||
isc_app_shutdown();
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NS_COMMAND_DUMPSTATS)) {
|
||||
result = ns_server_dumpstats(ns_g_server);
|
||||
} else if (command_compare(command, NS_COMMAND_QUERYLOG)) {
|
||||
result = ns_server_togglequerylog(ns_g_server, lex);
|
||||
} else if (command_compare(command, NS_COMMAND_ADDZONE) ||
|
||||
command_compare(command, NS_COMMAND_MODZONE)) {
|
||||
result = ns_server_changezone(ns_g_server, cmdline, text);
|
||||
} else if (command_compare(command, NS_COMMAND_DELZONE)) {
|
||||
result = ns_server_delzone(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_DNSTAP) ||
|
||||
command_compare(command, NS_COMMAND_DNSTAPREOPEN)) {
|
||||
result = ns_server_dnstap(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_DUMPDB)) {
|
||||
ns_server_dumpdb(ns_g_server, lex, text);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NS_COMMAND_SECROOTS)) {
|
||||
result = ns_server_dumpsecroots(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_TRACE)) {
|
||||
result = ns_server_setdebuglevel(ns_g_server, lex);
|
||||
} else if (command_compare(command, NS_COMMAND_NOTRACE)) {
|
||||
ns_g_debuglevel = 0;
|
||||
isc_log_setdebuglevel(ns_g_lctx, ns_g_debuglevel);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NS_COMMAND_DUMPSTATS)) {
|
||||
result = ns_server_dumpstats(ns_g_server);
|
||||
} else if (command_compare(command, NS_COMMAND_FLUSH)) {
|
||||
result = ns_server_flushcache(ns_g_server, lex);
|
||||
} else if (command_compare(command, NS_COMMAND_FLUSHNAME)) {
|
||||
result = ns_server_flushnode(ns_g_server, lex, false);
|
||||
} else if (command_compare(command, NS_COMMAND_FLUSHTREE)) {
|
||||
result = ns_server_flushnode(ns_g_server, lex, true);
|
||||
} else if (command_compare(command, NS_COMMAND_STATUS)) {
|
||||
result = ns_server_status(ns_g_server, text);
|
||||
} else if (command_compare(command, NS_COMMAND_TSIGLIST)) {
|
||||
result = ns_server_tsiglist(ns_g_server, text);
|
||||
} else if (command_compare(command, NS_COMMAND_TSIGDELETE)) {
|
||||
result = ns_server_tsigdelete(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_FREEZE)) {
|
||||
result = ns_server_freeze(ns_g_server, true, lex,
|
||||
text);
|
||||
} else if (command_compare(command, NS_COMMAND_UNFREEZE) ||
|
||||
command_compare(command, NS_COMMAND_THAW)) {
|
||||
result = ns_server_freeze(ns_g_server, false, lex,
|
||||
text);
|
||||
} else if (command_compare(command, NS_COMMAND_LOADKEYS) ||
|
||||
command_compare(command, NS_COMMAND_SIGN)) {
|
||||
result = ns_server_rekey(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_MKEYS)) {
|
||||
result = ns_server_mkeys(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_NOTIFY)) {
|
||||
result = ns_server_notifycommand(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_NOTRACE)) {
|
||||
ns_g_debuglevel = 0;
|
||||
isc_log_setdebuglevel(ns_g_lctx, ns_g_debuglevel);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NS_COMMAND_NTA)) {
|
||||
result = ns_server_nta(ns_g_server, lex, readonly, text);
|
||||
} else if (command_compare(command, NS_COMMAND_NULL)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NS_COMMAND_QUERYLOG)) {
|
||||
result = ns_server_togglequerylog(ns_g_server, lex);
|
||||
} else if (command_compare(command, NS_COMMAND_RECONFIG)) {
|
||||
result = ns_server_reconfigcommand(ns_g_server);
|
||||
} else if (command_compare(command, NS_COMMAND_RECURSING)) {
|
||||
result = ns_server_dumprecursing(ns_g_server);
|
||||
} else if (command_compare(command, NS_COMMAND_REFRESH)) {
|
||||
result = ns_server_refreshcommand(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_RELOAD)) {
|
||||
result = ns_server_reloadcommand(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_RETRANSFER)) {
|
||||
result = ns_server_retransfercommand(ns_g_server,
|
||||
lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_SCAN)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
ns_server_scan_interfaces(ns_g_server);
|
||||
} else if (command_compare(command, NS_COMMAND_SECROOTS)) {
|
||||
result = ns_server_dumpsecroots(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_SIGNING)) {
|
||||
result = ns_server_signing(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_SHOWZONE)) {
|
||||
result = ns_server_showzone(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_STATUS)) {
|
||||
result = ns_server_status(ns_g_server, text);
|
||||
} else if (command_compare(command, NS_COMMAND_SYNC)) {
|
||||
result = ns_server_sync(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_RECURSING)) {
|
||||
result = ns_server_dumprecursing(ns_g_server);
|
||||
} else if (command_compare(command, NS_COMMAND_THAW) ||
|
||||
command_compare(command, NS_COMMAND_UNFREEZE)) {
|
||||
result = ns_server_freeze(ns_g_server, false, lex,
|
||||
text);
|
||||
} else if (command_compare(command, NS_COMMAND_TESTGEN)) {
|
||||
result = ns_server_testgen(lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_TIMERPOKE)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
isc_timermgr_poke(ns_g_timermgr);
|
||||
} else if (command_compare(command, NS_COMMAND_NULL)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NS_COMMAND_NOTIFY)) {
|
||||
result = ns_server_notifycommand(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_TRACE)) {
|
||||
result = ns_server_setdebuglevel(ns_g_server, lex);
|
||||
} else if (command_compare(command, NS_COMMAND_TSIGDELETE)) {
|
||||
result = ns_server_tsigdelete(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_TSIGLIST)) {
|
||||
result = ns_server_tsiglist(ns_g_server, text);
|
||||
} else if (command_compare(command, NS_COMMAND_VALIDATION)) {
|
||||
result = ns_server_validation(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_SIGN) ||
|
||||
command_compare(command, NS_COMMAND_LOADKEYS)) {
|
||||
result = ns_server_rekey(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_ADDZONE) ||
|
||||
command_compare(command, NS_COMMAND_MODZONE)) {
|
||||
result = ns_server_changezone(ns_g_server, cmdline, text);
|
||||
} else if (command_compare(command, NS_COMMAND_DELZONE)) {
|
||||
result = ns_server_delzone(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_SHOWZONE)) {
|
||||
result = ns_server_showzone(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_SIGNING)) {
|
||||
result = ns_server_signing(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_ZONESTATUS)) {
|
||||
result = ns_server_zonestatus(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_NTA)) {
|
||||
result = ns_server_nta(ns_g_server, lex, readonly, text);
|
||||
} else if (command_compare(command, NS_COMMAND_TESTGEN)) {
|
||||
result = ns_server_testgen(lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_MKEYS)) {
|
||||
result = ns_server_mkeys(ns_g_server, lex, text);
|
||||
} else if (command_compare(command, NS_COMMAND_DNSTAP) ||
|
||||
command_compare(command, NS_COMMAND_DNSTAPREOPEN)) {
|
||||
result = ns_server_dnstap(ns_g_server, lex, text);
|
||||
} else {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL, ISC_LOG_WARNING,
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: client.h,v 1.96 2012/01/31 23:47:31 tbox Exp $ */
|
||||
|
||||
#ifndef NAMED_CLIENT_H
|
||||
#define NAMED_CLIENT_H 1
|
||||
|
||||
@@ -80,6 +78,13 @@
|
||||
*** Types
|
||||
***/
|
||||
|
||||
/*% reference-counted TCP connection object */
|
||||
typedef struct ns_tcpconn {
|
||||
isc_refcount_t refs;
|
||||
isc_quota_t *tcpquota;
|
||||
bool pipelined;
|
||||
} ns_tcpconn_t;
|
||||
|
||||
/*% nameserver client structure */
|
||||
struct ns_client {
|
||||
unsigned int magic;
|
||||
@@ -94,7 +99,8 @@ struct ns_client {
|
||||
int nupdates;
|
||||
int nctls;
|
||||
int references;
|
||||
bool needshutdown; /*
|
||||
bool tcpactive;
|
||||
bool needshutdown; /*
|
||||
* Used by clienttest to get
|
||||
* the client to go from
|
||||
* inactive to free state
|
||||
@@ -130,10 +136,9 @@ struct ns_client {
|
||||
isc_stdtime_t now;
|
||||
isc_time_t tnow;
|
||||
dns_name_t signername; /*%< [T]SIG key name */
|
||||
dns_name_t * signer; /*%< NULL if not valid sig */
|
||||
bool mortal; /*%< Die after handling request */
|
||||
bool pipelined; /*%< TCP queries not in sequence */
|
||||
isc_quota_t *tcpquota;
|
||||
dns_name_t *signer; /*%< NULL if not valid sig */
|
||||
bool mortal; /*%< Die after handling request */
|
||||
ns_tcpconn_t *tcpconn;
|
||||
isc_quota_t *recursionquota;
|
||||
ns_interface_t *interface;
|
||||
|
||||
@@ -143,8 +148,8 @@ struct ns_client {
|
||||
isc_sockaddr_t destsockaddr;
|
||||
|
||||
isc_netaddr_t ecs_addr; /*%< EDNS client subnet */
|
||||
uint8_t ecs_addrlen;
|
||||
uint8_t ecs_scope;
|
||||
uint8_t ecs_addrlen;
|
||||
uint8_t ecs_scope;
|
||||
|
||||
struct in6_pktinfo pktinfo;
|
||||
isc_dscp_t dscp;
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: interfacemgr.h,v 1.35 2011/07/28 23:47:58 tbox Exp $ */
|
||||
|
||||
#ifndef NAMED_INTERFACEMGR_H
|
||||
#define NAMED_INTERFACEMGR_H 1
|
||||
|
||||
@@ -77,9 +75,14 @@ struct ns_interface {
|
||||
/*%< UDP dispatchers. */
|
||||
isc_socket_t * tcpsocket; /*%< TCP socket. */
|
||||
isc_dscp_t dscp; /*%< "listen-on" DSCP value */
|
||||
int ntcptarget; /*%< Desired number of concurrent
|
||||
TCP accepts */
|
||||
int ntcpcurrent; /*%< Current ditto, locked */
|
||||
int32_t ntcpaccepting; /*%< Number of clients
|
||||
ready to accept new
|
||||
TCP connections on this
|
||||
interface */
|
||||
int32_t ntcpactive; /*%< Number of clients
|
||||
servicing TCP queries
|
||||
(whether accepting or
|
||||
connected) */
|
||||
int nudpdispatch; /*%< Number of UDP dispatches */
|
||||
ns_clientmgr_t * clientmgr; /*%< Client manager. */
|
||||
ISC_LINK(ns_interface_t) link;
|
||||
|
||||
@@ -386,8 +386,9 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
|
||||
* connections will be handled in parallel even though there is
|
||||
* only one client initially.
|
||||
*/
|
||||
ifp->ntcptarget = 1;
|
||||
ifp->ntcpcurrent = 0;
|
||||
ifp->ntcpaccepting = 0;
|
||||
ifp->ntcpactive = 0;
|
||||
|
||||
ifp->nudpdispatch = 0;
|
||||
|
||||
ifp->dscp = -1;
|
||||
@@ -522,9 +523,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
|
||||
*/
|
||||
(void)isc_socket_filter(ifp->tcpsocket, "dataready");
|
||||
|
||||
result = ns_clientmgr_createclients(ifp->clientmgr,
|
||||
ifp->ntcptarget, ifp,
|
||||
true);
|
||||
result = ns_clientmgr_createclients(ifp->clientmgr, 1, ifp, true);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"TCP ns_clientmgr_createclients(): %s",
|
||||
|
||||
@@ -157,6 +157,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig)
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
type = ISC_LOG_TOFILE;
|
||||
|
||||
@@ -1423,9 +1423,6 @@ main(int argc, char *argv[]) {
|
||||
if (strcmp(program_name, "lwresd") == 0)
|
||||
ns_g_lwresdonly = true;
|
||||
|
||||
if (result != ISC_R_SUCCESS)
|
||||
ns_main_earlyfatal("failed to build internal symbol table");
|
||||
|
||||
isc_assertion_setcallback(assertion_failed);
|
||||
isc_error_setfatal(library_fatal_error);
|
||||
isc_error_setunexpected(library_unexpected_error);
|
||||
|
||||
+24
-26
@@ -10,12 +10,12 @@
|
||||
.\" Title: named.conf
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2018-06-21
|
||||
.\" Date: 2019-02-20
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "NAMED\&.CONF" "5" "2018\-06\-21" "ISC" "BIND9"
|
||||
.TH "NAMED\&.CONF" "5" "2019\-02\-20" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -232,9 +232,9 @@ options {
|
||||
bindkeys\-file \fIquoted_string\fR;
|
||||
blackhole { \fIaddress_match_element\fR; \&.\&.\&. };
|
||||
cache\-file \fIquoted_string\fR;
|
||||
catalog\-zones { zone \fIquoted_string\fR [ default\-masters [ port
|
||||
\fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [
|
||||
port \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
|
||||
catalog\-zones { zone \fIstring\fR [ default\-masters [ port \fIinteger\fR ]
|
||||
[ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [ port
|
||||
\fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
|
||||
\fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [
|
||||
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIinteger\fR ]; \&.\&.\&. };
|
||||
check\-dup\-records ( fail | warn | ignore );
|
||||
@@ -418,13 +418,13 @@ options {
|
||||
require\-server\-cookie \fIboolean\fR;
|
||||
reserved\-sockets \fIinteger\fR;
|
||||
resolver\-query\-timeout \fIinteger\fR;
|
||||
response\-policy { zone \fIquoted_string\fR [ log \fIboolean\fR ] [
|
||||
max\-policy\-ttl \fIinteger\fR ] [ policy ( cname | disabled | drop |
|
||||
given | no\-op | nodata | nxdomain | passthru | tcp\-only
|
||||
\fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ]; \&.\&.\&. } [
|
||||
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIinteger\fR ] [
|
||||
min\-ns\-dots \fIinteger\fR ] [ nsip\-wait\-recurse \fIboolean\fR ] [
|
||||
qname\-wait\-recurse \fIboolean\fR ] [ recursive\-only \fIboolean\fR ];
|
||||
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
|
||||
\fIinteger\fR ] [ policy ( cname | disabled | drop | given | no\-op
|
||||
| nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
|
||||
recursive\-only \fIboolean\fR ]; \&.\&.\&. } [ break\-dnssec \fIboolean\fR ] [
|
||||
max\-policy\-ttl \fIinteger\fR ] [ min\-ns\-dots \fIinteger\fR ] [
|
||||
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
|
||||
[ recursive\-only \fIboolean\fR ];
|
||||
root\-delegation\-only [ exclude { \fIquoted_string\fR; \&.\&.\&. } ];
|
||||
root\-key\-sentinel \fIboolean\fR;
|
||||
rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name
|
||||
@@ -578,9 +578,9 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
auth\-nxdomain \fIboolean\fR; // default changed
|
||||
auto\-dnssec ( allow | maintain | off );
|
||||
cache\-file \fIquoted_string\fR;
|
||||
catalog\-zones { zone \fIquoted_string\fR [ default\-masters [ port
|
||||
\fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [
|
||||
port \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
|
||||
catalog\-zones { zone \fIstring\fR [ default\-masters [ port \fIinteger\fR ]
|
||||
[ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [ port
|
||||
\fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
|
||||
\fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [
|
||||
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIinteger\fR ]; \&.\&.\&. };
|
||||
check\-dup\-records ( fail | warn | ignore );
|
||||
@@ -734,13 +734,13 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
request\-nsid \fIboolean\fR;
|
||||
require\-server\-cookie \fIboolean\fR;
|
||||
resolver\-query\-timeout \fIinteger\fR;
|
||||
response\-policy { zone \fIquoted_string\fR [ log \fIboolean\fR ] [
|
||||
max\-policy\-ttl \fIinteger\fR ] [ policy ( cname | disabled | drop |
|
||||
given | no\-op | nodata | nxdomain | passthru | tcp\-only
|
||||
\fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ]; \&.\&.\&. } [
|
||||
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIinteger\fR ] [
|
||||
min\-ns\-dots \fIinteger\fR ] [ nsip\-wait\-recurse \fIboolean\fR ] [
|
||||
qname\-wait\-recurse \fIboolean\fR ] [ recursive\-only \fIboolean\fR ];
|
||||
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
|
||||
\fIinteger\fR ] [ policy ( cname | disabled | drop | given | no\-op
|
||||
| nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
|
||||
recursive\-only \fIboolean\fR ]; \&.\&.\&. } [ break\-dnssec \fIboolean\fR ] [
|
||||
max\-policy\-ttl \fIinteger\fR ] [ min\-ns\-dots \fIinteger\fR ] [
|
||||
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
|
||||
[ recursive\-only \fIboolean\fR ];
|
||||
root\-delegation\-only [ exclude { \fIquoted_string\fR; \&.\&.\&. } ];
|
||||
root\-key\-sentinel \fIboolean\fR;
|
||||
rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name
|
||||
@@ -875,8 +875,7 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
request\-expire \fIboolean\fR;
|
||||
request\-ixfr \fIboolean\fR;
|
||||
serial\-update\-method ( date | increment | unixtime );
|
||||
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [
|
||||
port \fIinteger\fR ]; \&.\&.\&. };
|
||||
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ); \&.\&.\&. };
|
||||
server\-names { \fIquoted_string\fR; \&.\&.\&. };
|
||||
sig\-signing\-nodes \fIinteger\fR;
|
||||
sig\-signing\-signatures \fIinteger\fR;
|
||||
@@ -980,8 +979,7 @@ zone \fIstring\fR [ \fIclass\fR ] {
|
||||
request\-expire \fIboolean\fR;
|
||||
request\-ixfr \fIboolean\fR;
|
||||
serial\-update\-method ( date | increment | unixtime );
|
||||
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [ port
|
||||
\fIinteger\fR ]; \&.\&.\&. };
|
||||
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ); \&.\&.\&. };
|
||||
server\-names { \fIquoted_string\fR; \&.\&.\&. };
|
||||
sig\-signing\-nodes \fIinteger\fR;
|
||||
sig\-signing\-signatures \fIinteger\fR;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf">
|
||||
<info>
|
||||
<date>2018-06-21</date>
|
||||
<date>2019-02-20</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
@@ -221,9 +221,9 @@ options {
|
||||
bindkeys-file <replaceable>quoted_string</replaceable>;
|
||||
blackhole { <replaceable>address_match_element</replaceable>; ... };
|
||||
cache-file <replaceable>quoted_string</replaceable>;
|
||||
catalog-zones { zone <replaceable>quoted_string</replaceable> [ default-masters [ port
|
||||
<replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [
|
||||
port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
|
||||
catalog-zones { zone <replaceable>string</replaceable> [ default-masters [ port <replaceable>integer</replaceable> ]
|
||||
[ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ port
|
||||
<replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
|
||||
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [
|
||||
in-memory <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>integer</replaceable> ]; ... };
|
||||
check-dup-records ( fail | warn | ignore );
|
||||
@@ -407,13 +407,13 @@ options {
|
||||
require-server-cookie <replaceable>boolean</replaceable>;
|
||||
reserved-sockets <replaceable>integer</replaceable>;
|
||||
resolver-query-timeout <replaceable>integer</replaceable>;
|
||||
response-policy { zone <replaceable>quoted_string</replaceable> [ log <replaceable>boolean</replaceable> ] [
|
||||
max-policy-ttl <replaceable>integer</replaceable> ] [ policy ( cname | disabled | drop |
|
||||
given | no-op | nodata | nxdomain | passthru | tcp-only
|
||||
<replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ]; ... } [
|
||||
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>integer</replaceable> ] [
|
||||
min-ns-dots <replaceable>integer</replaceable> ] [ nsip-wait-recurse <replaceable>boolean</replaceable> ] [
|
||||
qname-wait-recurse <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ];
|
||||
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
|
||||
<replaceable>integer</replaceable> ] [ policy ( cname | disabled | drop | given | no-op
|
||||
| nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
|
||||
recursive-only <replaceable>boolean</replaceable> ]; ... } [ break-dnssec <replaceable>boolean</replaceable> ] [
|
||||
max-policy-ttl <replaceable>integer</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
|
||||
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
|
||||
[ recursive-only <replaceable>boolean</replaceable> ];
|
||||
root-delegation-only [ exclude { <replaceable>quoted_string</replaceable>; ... } ];
|
||||
root-key-sentinel <replaceable>boolean</replaceable>;
|
||||
rrset-order { [ class <replaceable>string</replaceable> ] [ type <replaceable>string</replaceable> ] [ name
|
||||
@@ -551,9 +551,9 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
auth-nxdomain <replaceable>boolean</replaceable>; // default changed
|
||||
auto-dnssec ( allow | maintain | off );
|
||||
cache-file <replaceable>quoted_string</replaceable>;
|
||||
catalog-zones { zone <replaceable>quoted_string</replaceable> [ default-masters [ port
|
||||
<replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [
|
||||
port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
|
||||
catalog-zones { zone <replaceable>string</replaceable> [ default-masters [ port <replaceable>integer</replaceable> ]
|
||||
[ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ port
|
||||
<replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
|
||||
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [
|
||||
in-memory <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>integer</replaceable> ]; ... };
|
||||
check-dup-records ( fail | warn | ignore );
|
||||
@@ -707,13 +707,13 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
request-nsid <replaceable>boolean</replaceable>;
|
||||
require-server-cookie <replaceable>boolean</replaceable>;
|
||||
resolver-query-timeout <replaceable>integer</replaceable>;
|
||||
response-policy { zone <replaceable>quoted_string</replaceable> [ log <replaceable>boolean</replaceable> ] [
|
||||
max-policy-ttl <replaceable>integer</replaceable> ] [ policy ( cname | disabled | drop |
|
||||
given | no-op | nodata | nxdomain | passthru | tcp-only
|
||||
<replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ]; ... } [
|
||||
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>integer</replaceable> ] [
|
||||
min-ns-dots <replaceable>integer</replaceable> ] [ nsip-wait-recurse <replaceable>boolean</replaceable> ] [
|
||||
qname-wait-recurse <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ];
|
||||
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
|
||||
<replaceable>integer</replaceable> ] [ policy ( cname | disabled | drop | given | no-op
|
||||
| nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
|
||||
recursive-only <replaceable>boolean</replaceable> ]; ... } [ break-dnssec <replaceable>boolean</replaceable> ] [
|
||||
max-policy-ttl <replaceable>integer</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
|
||||
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
|
||||
[ recursive-only <replaceable>boolean</replaceable> ];
|
||||
root-delegation-only [ exclude { <replaceable>quoted_string</replaceable>; ... } ];
|
||||
root-key-sentinel <replaceable>boolean</replaceable>;
|
||||
rrset-order { [ class <replaceable>string</replaceable> ] [ type <replaceable>string</replaceable> ] [ name
|
||||
@@ -848,8 +848,7 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
request-expire <replaceable>boolean</replaceable>;
|
||||
request-ixfr <replaceable>boolean</replaceable>;
|
||||
serial-update-method ( date | increment | unixtime );
|
||||
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) [
|
||||
port <replaceable>integer</replaceable> ]; ... };
|
||||
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ); ... };
|
||||
server-names { <replaceable>quoted_string</replaceable>; ... };
|
||||
sig-signing-nodes <replaceable>integer</replaceable>;
|
||||
sig-signing-signatures <replaceable>integer</replaceable>;
|
||||
@@ -949,8 +948,7 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
|
||||
request-expire <replaceable>boolean</replaceable>;
|
||||
request-ixfr <replaceable>boolean</replaceable>;
|
||||
serial-update-method ( date | increment | unixtime );
|
||||
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) [ port
|
||||
<replaceable>integer</replaceable> ]; ... };
|
||||
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ); ... };
|
||||
server-names { <replaceable>quoted_string</replaceable>; ... };
|
||||
sig-signing-nodes <replaceable>integer</replaceable>;
|
||||
sig-signing-signatures <replaceable>integer</replaceable>;
|
||||
|
||||
+22
-24
@@ -209,9 +209,9 @@ options
|
||||
bindkeys-file <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
blackhole { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
|
||||
cache-file <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
catalog-zones { zone <em class="replaceable"><code>quoted_string</code></em> [ default-masters [ port<br>
|
||||
<em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
|
||||
port <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
|
||||
catalog-zones { zone <em class="replaceable"><code>string</code></em> [ default-masters [ port <em class="replaceable"><code>integer</code></em> ]<br>
|
||||
[ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
|
||||
<em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
|
||||
<em class="replaceable"><code>string</code></em> ]; ... } ] [ zone-directory <em class="replaceable"><code>quoted_string</code></em> ] [<br>
|
||||
in-memory <em class="replaceable"><code>boolean</code></em> ] [ min-update-interval <em class="replaceable"><code>integer</code></em> ]; ... };<br>
|
||||
check-dup-records ( fail | warn | ignore );<br>
|
||||
@@ -395,13 +395,13 @@ options
|
||||
require-server-cookie <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
reserved-sockets <em class="replaceable"><code>integer</code></em>;<br>
|
||||
resolver-query-timeout <em class="replaceable"><code>integer</code></em>;<br>
|
||||
response-policy { zone <em class="replaceable"><code>quoted_string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ policy ( cname | disabled | drop |<br>
|
||||
given | no-op | nodata | nxdomain | passthru | tcp-only<br>
|
||||
<em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
|
||||
break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [<br>
|
||||
min-ns-dots <em class="replaceable"><code>integer</code></em> ] [ nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ recursive-only <em class="replaceable"><code>boolean</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>integer</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> ]; ... } [ break-dnssec <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
max-policy-ttl <em class="replaceable"><code>integer</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>
|
||||
[ recursive-only <em class="replaceable"><code>boolean</code></em> ];<br>
|
||||
root-delegation-only [ exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
|
||||
root-key-sentinel <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br>
|
||||
@@ -543,9 +543,9 @@ view
|
||||
auth-nxdomain <em class="replaceable"><code>boolean</code></em>; // default changed<br>
|
||||
auto-dnssec ( allow | maintain | off );<br>
|
||||
cache-file <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
catalog-zones { zone <em class="replaceable"><code>quoted_string</code></em> [ default-masters [ port<br>
|
||||
<em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
|
||||
port <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
|
||||
catalog-zones { zone <em class="replaceable"><code>string</code></em> [ default-masters [ port <em class="replaceable"><code>integer</code></em> ]<br>
|
||||
[ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
|
||||
<em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
|
||||
<em class="replaceable"><code>string</code></em> ]; ... } ] [ zone-directory <em class="replaceable"><code>quoted_string</code></em> ] [<br>
|
||||
in-memory <em class="replaceable"><code>boolean</code></em> ] [ min-update-interval <em class="replaceable"><code>integer</code></em> ]; ... };<br>
|
||||
check-dup-records ( fail | warn | ignore );<br>
|
||||
@@ -699,13 +699,13 @@ view
|
||||
request-nsid <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
require-server-cookie <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
resolver-query-timeout <em class="replaceable"><code>integer</code></em>;<br>
|
||||
response-policy { zone <em class="replaceable"><code>quoted_string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ policy ( cname | disabled | drop |<br>
|
||||
given | no-op | nodata | nxdomain | passthru | tcp-only<br>
|
||||
<em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
|
||||
break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [<br>
|
||||
min-ns-dots <em class="replaceable"><code>integer</code></em> ] [ nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ recursive-only <em class="replaceable"><code>boolean</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>integer</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> ]; ... } [ break-dnssec <em class="replaceable"><code>boolean</code></em> ] [<br>
|
||||
max-policy-ttl <em class="replaceable"><code>integer</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>
|
||||
[ recursive-only <em class="replaceable"><code>boolean</code></em> ];<br>
|
||||
root-delegation-only [ exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
|
||||
root-key-sentinel <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br>
|
||||
@@ -840,8 +840,7 @@ view
|
||||
request-expire <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
request-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
serial-update-method ( date | increment | unixtime );<br>
|
||||
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [<br>
|
||||
port <em class="replaceable"><code>integer</code></em> ]; ... };<br>
|
||||
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ); ... };<br>
|
||||
server-names { <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
|
||||
sig-signing-nodes <em class="replaceable"><code>integer</code></em>;<br>
|
||||
sig-signing-signatures <em class="replaceable"><code>integer</code></em>;<br>
|
||||
@@ -942,8 +941,7 @@ zone
|
||||
request-expire <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
request-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
serial-update-method ( date | increment | unixtime );<br>
|
||||
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [ port<br>
|
||||
<em class="replaceable"><code>integer</code></em> ]; ... };<br>
|
||||
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ); ... };<br>
|
||||
server-names { <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
|
||||
sig-signing-nodes <em class="replaceable"><code>integer</code></em>;<br>
|
||||
sig-signing-signatures <em class="replaceable"><code>integer</code></em>;<br>
|
||||
|
||||
+81
-58
@@ -979,12 +979,15 @@ rpz_log_rewrite(ns_client_t *client, bool disabled,
|
||||
dns_zone_t *p_zone, dns_name_t *p_name,
|
||||
dns_name_t *cname, dns_rpz_num_t rpz_num)
|
||||
{
|
||||
isc_stats_t *zonestats;
|
||||
char qname_buf[DNS_NAME_FORMATSIZE];
|
||||
char p_name_buf[DNS_NAME_FORMATSIZE];
|
||||
char cname_buf[DNS_NAME_FORMATSIZE] = { 0 };
|
||||
char p_name_buf[DNS_NAME_FORMATSIZE];
|
||||
char qname_buf[DNS_NAME_FORMATSIZE];
|
||||
char classbuf[DNS_RDATACLASS_FORMATSIZE];
|
||||
char typebuf[DNS_RDATATYPE_FORMATSIZE];
|
||||
const char *s1 = cname_buf, *s2 = cname_buf;
|
||||
dns_rdataset_t *rdataset;
|
||||
dns_rpz_st_t *st;
|
||||
isc_stats_t *zonestats;
|
||||
|
||||
/*
|
||||
* Count enabled rewrites in the global counter.
|
||||
@@ -1016,11 +1019,29 @@ rpz_log_rewrite(ns_client_t *client, bool disabled,
|
||||
s2 = ")";
|
||||
}
|
||||
|
||||
/*
|
||||
* Log Qclass and Qtype in addition to existing
|
||||
* fields.
|
||||
*/
|
||||
rdataset = ISC_LIST_HEAD(client->query.origqname->list);
|
||||
INSIST(rdataset != NULL);
|
||||
dns_rdataclass_format(rdataset->rdclass, classbuf, sizeof(classbuf));
|
||||
dns_rdatatype_format(rdataset->type, typebuf, sizeof(typebuf));
|
||||
|
||||
ns_client_log(client, DNS_LOGCATEGORY_RPZ, NS_LOGMODULE_QUERY,
|
||||
DNS_RPZ_INFO_LEVEL, "%srpz %s %s rewrite %s via %s%s%s%s",
|
||||
DNS_RPZ_INFO_LEVEL,
|
||||
#ifdef RPZ_LOG_QTYPE_QCLASS
|
||||
"%srpz %s %s rewrite %s/%s/%s via %s%s%s%s",
|
||||
#else /* RPZ_LOG_QTYPE_QCLASS */
|
||||
"%srpz %s %s rewrite %s via %s%s%s%s",
|
||||
#endif /* RPZ_LOG_QTYPE_QCLASS */
|
||||
disabled ? "disabled " : "",
|
||||
dns_rpz_type2str(type), dns_rpz_policy2str(policy),
|
||||
qname_buf, p_name_buf, s1, cname_buf, s2);
|
||||
qname_buf,
|
||||
#ifdef RPZ_LOG_QTYPE_QCLASS
|
||||
typebuf, classbuf,
|
||||
#endif /* RPZ_LOG_QTYPE_QCLASS */
|
||||
p_name_buf, s1, cname_buf, s2);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2879,8 +2900,7 @@ query_addsoa(ns_client_t *client, dns_db_t *db, dns_dbversion_t *version,
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &soa, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
if (override_ttl != UINT32_MAX &&
|
||||
override_ttl < rdataset->ttl) {
|
||||
@@ -3291,8 +3311,7 @@ validate(ns_client_t *client, dns_db_t *db, dns_name_t *name,
|
||||
dns_rdata_reset(&rdata);
|
||||
dns_rdataset_current(sigrdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &rrsig, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (false);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
if (!dns_resolver_algorithm_supported(client->view->resolver,
|
||||
name, rrsig.algorithm))
|
||||
continue;
|
||||
@@ -3858,8 +3877,7 @@ query_addwildcardproof(ns_client_t *client, dns_db_t *db,
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &nsec, NULL);
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
(void)dns_name_fullcompare(name, fname, &order,
|
||||
&olabels);
|
||||
(void)dns_name_fullcompare(name, &nsec.next, &order,
|
||||
@@ -3939,8 +3957,7 @@ query_addnxrrsetnsec(ns_client_t *client, dns_db_t *db,
|
||||
dns_rdata_init(&sigrdata);
|
||||
dns_rdataset_current(sigrdataset, &sigrdata);
|
||||
result = dns_rdata_tostruct(&sigrdata, &sig, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
labels = dns_name_countlabels(name);
|
||||
if ((unsigned int)sig.labels + 1 >= labels)
|
||||
@@ -4475,6 +4492,7 @@ rpz_get_zbits(ns_client_t *client,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4699,6 +4717,7 @@ rpz_get_p_name(ns_client_t *client, dns_name_t *p_name,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5717,14 +5736,8 @@ rpz_rewrite(ns_client_t *client, dns_rdatatype_t qtype,
|
||||
|
||||
dns_rdataset_current(st->r.ns_rdataset, &nsrdata);
|
||||
result = dns_rdata_tostruct(&nsrdata, &ns, NULL);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
dns_rdata_reset(&nsrdata);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
rpz_log_fail(client, DNS_RPZ_ERROR_LEVEL,
|
||||
nsname, DNS_RPZ_TYPE_NSIP,
|
||||
" rdata_tostruct()", result);
|
||||
st->m.policy = DNS_RPZ_POLICY_ERROR;
|
||||
goto cleanup;
|
||||
}
|
||||
/*
|
||||
* Do nothing about "NS ."
|
||||
*/
|
||||
@@ -6019,6 +6032,7 @@ setup_query_sortlist(ns_client_t *client) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
dns_message_setsortorder(client->message, order, order_arg);
|
||||
@@ -6271,7 +6285,8 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
|
||||
result = dns_rdataset_first(rdataset);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
dns_rdata_tostruct(&rdata, &nsec3, NULL);
|
||||
result = dns_rdata_tostruct(&rdata, &nsec3, NULL);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
dns_rdata_reset(&rdata);
|
||||
optout = (nsec3.flags & DNS_NSEC3FLAG_OPTOUT);
|
||||
if (found != NULL && optout &&
|
||||
@@ -7018,17 +7033,17 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
{
|
||||
if (isc_log_wouldlog(ns_g_lctx, ISC_LOG_DEBUG(1))) {
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
char typename[DNS_RDATATYPE_FORMATSIZE];
|
||||
char typebuf[DNS_RDATATYPE_FORMATSIZE];
|
||||
|
||||
dns_name_format(client->query.qname,
|
||||
namebuf, sizeof(namebuf));
|
||||
dns_rdatatype_format(qtype, typename,
|
||||
sizeof(typename));
|
||||
dns_rdatatype_format(qtype, typebuf,
|
||||
sizeof(typebuf));
|
||||
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
|
||||
NS_LOGMODULE_QUERY,
|
||||
ISC_LOG_DEBUG(1),
|
||||
"servfail cache hit %s/%s (%s)",
|
||||
namebuf, typename,
|
||||
namebuf, typebuf,
|
||||
((flags & NS_FAILCACHE_CD) != 0)
|
||||
? "CD=1"
|
||||
: "CD=0");
|
||||
@@ -7056,22 +7071,35 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
need_wildcardproof = false;
|
||||
rpz = false;
|
||||
|
||||
/*
|
||||
* If we require a server cookie then send back BADCOOKIE
|
||||
* before we have done too much work.
|
||||
*/
|
||||
if (!TCP(client) && client->view->requireservercookie &&
|
||||
WANTCOOKIE(client) && !HAVECOOKIE(client))
|
||||
{
|
||||
client->message->flags &= ~DNS_MESSAGEFLAG_AA;
|
||||
client->message->flags &= ~DNS_MESSAGEFLAG_AD;
|
||||
client->message->rcode = dns_rcode_badcookie;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (client->view->checknames &&
|
||||
!dns_rdata_checkowner(client->query.qname,
|
||||
client->message->rdclass,
|
||||
qtype, false)) {
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
char typename[DNS_RDATATYPE_FORMATSIZE];
|
||||
char classname[DNS_RDATACLASS_FORMATSIZE];
|
||||
char typebuf[DNS_RDATATYPE_FORMATSIZE];
|
||||
char classbuf[DNS_RDATACLASS_FORMATSIZE];
|
||||
|
||||
dns_name_format(client->query.qname, namebuf, sizeof(namebuf));
|
||||
dns_rdatatype_format(qtype, typename, sizeof(typename));
|
||||
dns_rdataclass_format(client->message->rdclass, classname,
|
||||
sizeof(classname));
|
||||
dns_rdatatype_format(qtype, typebuf, sizeof(typebuf));
|
||||
dns_rdataclass_format(client->message->rdclass, classbuf,
|
||||
sizeof(classbuf));
|
||||
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
||||
NS_LOGMODULE_QUERY, ISC_LOG_ERROR,
|
||||
"check-names failure %s/%s/%s", namebuf,
|
||||
typename, classname);
|
||||
typebuf, classbuf);
|
||||
QUERY_ERROR(DNS_R_REFUSED);
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -8432,11 +8460,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
}
|
||||
dns_rdataset_current(trdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
dns_rdata_reset(&rdata);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_message_puttempname(client->message, &tname);
|
||||
goto cleanup;
|
||||
}
|
||||
dns_name_init(tname, NULL);
|
||||
result = dns_name_dup(&cname.cname, client->mctx, tname);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
@@ -8503,11 +8528,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
}
|
||||
dns_rdataset_current(trdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &dname, NULL);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
dns_rdata_reset(&rdata);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_message_puttempname(client->message, &tname);
|
||||
goto cleanup;
|
||||
}
|
||||
dns_name_clone(&dname.dname, tname);
|
||||
dns_rdata_freestruct(&dname);
|
||||
/*
|
||||
@@ -9239,7 +9261,7 @@ static inline void
|
||||
log_tat(ns_client_t *client) {
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
char clientbuf[ISC_NETADDR_FORMATSIZE];
|
||||
char classname[DNS_RDATACLASS_FORMATSIZE];
|
||||
char classbuf[DNS_RDATACLASS_FORMATSIZE];
|
||||
isc_netaddr_t netaddr;
|
||||
char *tags = NULL;
|
||||
size_t taglen = 0;
|
||||
@@ -9259,8 +9281,8 @@ log_tat(ns_client_t *client) {
|
||||
isc_netaddr_fromsockaddr(&netaddr, &client->peeraddr);
|
||||
dns_name_format(client->query.qname, namebuf, sizeof(namebuf));
|
||||
isc_netaddr_format(&netaddr, clientbuf, sizeof(clientbuf));
|
||||
dns_rdataclass_format(client->view->rdclass, classname,
|
||||
sizeof(classname));
|
||||
dns_rdataclass_format(client->view->rdclass, classbuf,
|
||||
sizeof(classbuf));
|
||||
|
||||
if (client->query.qtype == dns_rdatatype_dnskey) {
|
||||
uint16_t keytags = client->keytag_len / 2;
|
||||
@@ -9289,7 +9311,7 @@ log_tat(ns_client_t *client) {
|
||||
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_TAT, NS_LOGMODULE_QUERY,
|
||||
ISC_LOG_INFO, "trust-anchor-telemetry '%s/%s' from %s%s",
|
||||
namebuf, classname, clientbuf, tags != NULL? tags : "");
|
||||
namebuf, classbuf, clientbuf, tags != NULL? tags : "");
|
||||
if (tags != NULL) {
|
||||
isc_mem_put(client->mctx, tags, taglen);
|
||||
}
|
||||
@@ -9298,8 +9320,8 @@ log_tat(ns_client_t *client) {
|
||||
static inline void
|
||||
log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
char typename[DNS_RDATATYPE_FORMATSIZE];
|
||||
char classname[DNS_RDATACLASS_FORMATSIZE];
|
||||
char typebuf[DNS_RDATATYPE_FORMATSIZE];
|
||||
char classbuf[DNS_RDATACLASS_FORMATSIZE];
|
||||
char onbuf[ISC_NETADDR_FORMATSIZE];
|
||||
char ednsbuf[sizeof("E(65535)")] = { 0 };
|
||||
dns_rdataset_t *rdataset;
|
||||
@@ -9311,8 +9333,8 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
|
||||
rdataset = ISC_LIST_HEAD(client->query.qname->list);
|
||||
INSIST(rdataset != NULL);
|
||||
dns_name_format(client->query.qname, namebuf, sizeof(namebuf));
|
||||
dns_rdataclass_format(rdataset->rdclass, classname, sizeof(classname));
|
||||
dns_rdatatype_format(rdataset->type, typename, sizeof(typename));
|
||||
dns_rdataclass_format(rdataset->rdclass, classbuf, sizeof(classbuf));
|
||||
dns_rdatatype_format(rdataset->type, typebuf, sizeof(typebuf));
|
||||
isc_netaddr_format(&client->destaddr, onbuf, sizeof(onbuf));
|
||||
|
||||
if (client->ednsversion >= 0)
|
||||
@@ -9321,7 +9343,7 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
|
||||
|
||||
ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY,
|
||||
level, "query: %s %s %s %s%s%s%s%s%s%s (%s)", namebuf,
|
||||
classname, typename, WANTRECURSION(client) ? "+" : "-",
|
||||
classbuf, typebuf, WANTRECURSION(client) ? "+" : "-",
|
||||
(client->signer != NULL) ? "S" : "", ednsbuf,
|
||||
TCP(client) ? "T" : "",
|
||||
((extflags & DNS_MESSAGEEXTFLAG_DO) != 0) ? "D" : "",
|
||||
@@ -9333,8 +9355,8 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
|
||||
static inline void
|
||||
log_queryerror(ns_client_t *client, isc_result_t result, int line, int level) {
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
char typename[DNS_RDATATYPE_FORMATSIZE];
|
||||
char classname[DNS_RDATACLASS_FORMATSIZE];
|
||||
char typebuf[DNS_RDATATYPE_FORMATSIZE];
|
||||
char classbuf[DNS_RDATACLASS_FORMATSIZE];
|
||||
const char *namep, *typep, *classp, *sep1, *sep2;
|
||||
dns_rdataset_t *rdataset;
|
||||
|
||||
@@ -9356,12 +9378,12 @@ log_queryerror(ns_client_t *client, isc_result_t result, int line, int level) {
|
||||
|
||||
rdataset = ISC_LIST_HEAD(client->query.origqname->list);
|
||||
if (rdataset != NULL) {
|
||||
dns_rdataclass_format(rdataset->rdclass, classname,
|
||||
sizeof(classname));
|
||||
classp = classname;
|
||||
dns_rdatatype_format(rdataset->type, typename,
|
||||
sizeof(typename));
|
||||
typep = typename;
|
||||
dns_rdataclass_format(rdataset->rdclass, classbuf,
|
||||
sizeof(classbuf));
|
||||
classp = classbuf;
|
||||
dns_rdatatype_format(rdataset->type, typebuf,
|
||||
sizeof(typebuf));
|
||||
typep = typebuf;
|
||||
sep2 = "/";
|
||||
}
|
||||
}
|
||||
@@ -9561,7 +9583,7 @@ ns_query_start(ns_client_t *client) {
|
||||
* We don't need to set DNS_DBFIND_PENDINGOK when validation is
|
||||
* disabled as there will be no pending data.
|
||||
*/
|
||||
if (message->flags & DNS_MESSAGEFLAG_CD ||
|
||||
if ((message->flags & DNS_MESSAGEFLAG_CD) != 0 ||
|
||||
qtype == dns_rdatatype_rrsig)
|
||||
{
|
||||
client->query.dboptions |= DNS_DBFIND_PENDINGOK;
|
||||
@@ -9573,8 +9595,9 @@ ns_query_start(ns_client_t *client) {
|
||||
* Allow glue NS records to be added to the authority section
|
||||
* if the answer is secure.
|
||||
*/
|
||||
if (message->flags & DNS_MESSAGEFLAG_CD)
|
||||
if ((message->flags & DNS_MESSAGEFLAG_CD) != 0) {
|
||||
client->query.attributes &= ~NS_QUERYATTR_SECURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set NS_CLIENTATTR_WANTAD if the client has set AD in the query.
|
||||
|
||||
+184
-91
@@ -303,6 +303,13 @@ typedef struct catz_chgzone_event {
|
||||
bool mod;
|
||||
} catz_chgzone_event_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned int magic;
|
||||
#define DZARG_MAGIC ISC_MAGIC('D', 'z', 'a', 'r')
|
||||
isc_buffer_t **text;
|
||||
isc_result_t result;
|
||||
} ns_dzarg_t;
|
||||
|
||||
/*
|
||||
* These zones should not leak onto the Internet.
|
||||
*/
|
||||
@@ -1148,6 +1155,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
sa = *(cfg_obj_assockaddr(obj));
|
||||
@@ -1169,6 +1177,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -1276,18 +1285,20 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) {
|
||||
obj = cfg_tuple_get(ent, "ordering");
|
||||
INSIST(cfg_obj_isstring(obj));
|
||||
str = cfg_obj_asstring(obj);
|
||||
if (!strcasecmp(str, "fixed"))
|
||||
if (!strcasecmp(str, "fixed")) {
|
||||
#if DNS_RDATASET_FIXED
|
||||
mode = DNS_RDATASETATTR_FIXEDORDER;
|
||||
#else
|
||||
mode = 0;
|
||||
#endif /* DNS_RDATASET_FIXED */
|
||||
else if (!strcasecmp(str, "random"))
|
||||
} else if (!strcasecmp(str, "random")) {
|
||||
mode = DNS_RDATASETATTR_RANDOMIZE;
|
||||
else if (!strcasecmp(str, "cyclic"))
|
||||
} else if (!strcasecmp(str, "cyclic")) {
|
||||
mode = 0;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
* "*" should match everything including the root (BIND 8 compat).
|
||||
@@ -1401,14 +1412,16 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
|
||||
(void)cfg_map_get(cpeer, "transfer-format", &obj);
|
||||
if (obj != NULL) {
|
||||
str = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(str, "many-answers") == 0)
|
||||
if (strcasecmp(str, "many-answers") == 0) {
|
||||
CHECK(dns_peer_settransferformat(peer,
|
||||
dns_many_answers));
|
||||
else if (strcasecmp(str, "one-answer") == 0)
|
||||
} else if (strcasecmp(str, "one-answer") == 0) {
|
||||
CHECK(dns_peer_settransferformat(peer,
|
||||
dns_one_answer));
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -2181,7 +2194,15 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
|
||||
}
|
||||
|
||||
} else {
|
||||
if (result != ISC_R_NOTFOUND && result != DNS_R_PARTIALMATCH) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"catz: zone \"%s\" is overridden "
|
||||
"by explicitly configured zone",
|
||||
nameb);
|
||||
goto cleanup;
|
||||
} else if (result != ISC_R_NOTFOUND &&
|
||||
result != DNS_R_PARTIALMATCH) {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: error \"%s\" while trying to "
|
||||
@@ -2361,7 +2382,7 @@ catz_create_chg_task(dns_catz_entry_t *entry, dns_catz_zone_t *origin,
|
||||
catz_chgzone_event_t *event;
|
||||
isc_task_t *task;
|
||||
isc_result_t result;
|
||||
isc_taskaction_t action;
|
||||
isc_taskaction_t action = NULL;
|
||||
|
||||
switch (type) {
|
||||
case DNS_EVENT_CATZADDZONE:
|
||||
@@ -3561,8 +3582,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
view->checknames = false;
|
||||
} else if (strcasecmp(str, "ignore") == 0) {
|
||||
view->checknames = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "zero-no-soa-ttl-cache", &obj);
|
||||
@@ -3920,14 +3943,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
obj2 = cfg_tuple_get(obj, "response");
|
||||
if (!cfg_obj_isvoid(obj2)) {
|
||||
const char *resp = cfg_obj_asstring(obj2);
|
||||
isc_result_t r;
|
||||
isc_result_t r = DNS_R_SERVFAIL;
|
||||
|
||||
if (strcasecmp(resp, "drop") == 0)
|
||||
if (strcasecmp(resp, "drop") == 0) {
|
||||
r = DNS_R_DROP;
|
||||
else if (strcasecmp(resp, "fail") == 0)
|
||||
} else if (strcasecmp(resp, "fail") == 0) {
|
||||
r = DNS_R_SERVFAIL;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
dns_resolver_setquotaresponse(view->resolver,
|
||||
dns_quotatype_server, r);
|
||||
@@ -4234,20 +4259,24 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
view->minimalresponses = dns_minimal_noauth;
|
||||
} else if (strcasecmp(str, "no-auth-recursive") == 0) {
|
||||
view->minimalresponses = dns_minimal_noauthrec;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "transfer-format", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
str = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(str, "many-answers") == 0)
|
||||
if (strcasecmp(str, "many-answers") == 0) {
|
||||
view->transfer_format = dns_many_answers;
|
||||
else if (strcasecmp(str, "one-answer") == 0)
|
||||
} else if (strcasecmp(str, "one-answer") == 0) {
|
||||
view->transfer_format = dns_one_answer;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "trust-anchor-telemetry", &obj);
|
||||
@@ -4524,14 +4553,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
obj2 = cfg_tuple_get(obj, "response");
|
||||
if (!cfg_obj_isvoid(obj2)) {
|
||||
const char *resp = cfg_obj_asstring(obj2);
|
||||
isc_result_t r;
|
||||
isc_result_t r = DNS_R_SERVFAIL;
|
||||
|
||||
if (strcasecmp(resp, "drop") == 0)
|
||||
if (strcasecmp(resp, "drop") == 0) {
|
||||
r = DNS_R_DROP;
|
||||
else if (strcasecmp(resp, "fail") == 0)
|
||||
} else if (strcasecmp(resp, "fail") == 0) {
|
||||
r = DNS_R_SERVFAIL;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
dns_resolver_setquotaresponse(view->resolver,
|
||||
dns_quotatype_zone, r);
|
||||
@@ -4548,10 +4579,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
view->v4_aaaa = dns_aaaa_ok;
|
||||
} else {
|
||||
const char *v4_aaaastr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0)
|
||||
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0) {
|
||||
view->v4_aaaa = dns_aaaa_break_dnssec;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -4564,10 +4597,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
view->v6_aaaa = dns_aaaa_ok;
|
||||
} else {
|
||||
const char *v6_aaaastr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0)
|
||||
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0) {
|
||||
view->v6_aaaa = dns_aaaa_break_dnssec;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(configure_view_acl(vconfig, config, ns_g_config,
|
||||
@@ -4775,7 +4810,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
const char *empty_dbtype[4] =
|
||||
{ "_builtin", "empty", NULL, NULL };
|
||||
int empty_dbtypec = 4;
|
||||
dns_zonestat_level_t statlevel;
|
||||
dns_zonestat_level_t statlevel = dns_zonestat_none;
|
||||
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
|
||||
@@ -4813,14 +4848,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
statlevel = dns_zonestat_none;
|
||||
} else {
|
||||
const char *levelstr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(levelstr, "full") == 0)
|
||||
if (strcasecmp(levelstr, "full") == 0) {
|
||||
statlevel = dns_zonestat_full;
|
||||
else if (strcasecmp(levelstr, "terse") == 0)
|
||||
} else if (strcasecmp(levelstr, "terse") == 0) {
|
||||
statlevel = dns_zonestat_terse;
|
||||
else if (strcasecmp(levelstr, "none") == 0)
|
||||
} else if (strcasecmp(levelstr, "none") == 0) {
|
||||
statlevel = dns_zonestat_none;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
for (empty = empty_zones[empty_zone];
|
||||
@@ -5139,16 +5176,18 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
|
||||
"forwarding");
|
||||
fwdpolicy = dns_fwdpolicy_none;
|
||||
} else {
|
||||
if (forwardtype == NULL)
|
||||
if (forwardtype == NULL) {
|
||||
fwdpolicy = dns_fwdpolicy_first;
|
||||
else {
|
||||
} else {
|
||||
const char *forwardstr = cfg_obj_asstring(forwardtype);
|
||||
if (strcasecmp(forwardstr, "first") == 0)
|
||||
if (strcasecmp(forwardstr, "first") == 0) {
|
||||
fwdpolicy = dns_fwdpolicy_first;
|
||||
else if (strcasecmp(forwardstr, "only") == 0)
|
||||
} else if (strcasecmp(forwardstr, "only") == 0) {
|
||||
fwdpolicy = dns_fwdpolicy_only;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7025,11 +7064,11 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
putstr(text, "zone ");
|
||||
putmem(text, (const void *) zone_name, zone_name_len);
|
||||
putstr(text, " ");
|
||||
putmem(text, (const void *) zone_config, zone_config_len);
|
||||
putstr(text, ";\n");
|
||||
CHECK(putstr(text, "zone "));
|
||||
CHECK(putmem(text, (const void *) zone_name, zone_name_len));
|
||||
CHECK(putstr(text, " "));
|
||||
CHECK(putmem(text, (const void *) zone_config, zone_config_len));
|
||||
CHECK(putstr(text, ";\n"));
|
||||
|
||||
cfg_parser_reset(ns_g_addparser);
|
||||
result = cfg_parse_buffer3(ns_g_addparser, *text, zone_name, 0,
|
||||
@@ -8358,7 +8397,8 @@ load_configuration(const char *filename, ns_server_t *server,
|
||||
cfg_map_get(options, "memstatistics", &obj) == ISC_R_SUCCESS) {
|
||||
ns_g_memstatistics = cfg_obj_asboolean(obj);
|
||||
} else {
|
||||
ns_g_memstatistics = (isc_mem_debugging & ISC_MEM_DEBUGRECORD);
|
||||
ns_g_memstatistics =
|
||||
((isc_mem_debugging & ISC_MEM_DEBUGRECORD) != 0);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -8449,6 +8489,7 @@ load_configuration(const char *filename, ns_server_t *server,
|
||||
server->cookiealg = ns_cookiealg_aes;
|
||||
#else
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
#endif
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "sha1") == 0) {
|
||||
server->cookiealg = ns_cookiealg_sha1;
|
||||
@@ -8456,6 +8497,7 @@ load_configuration(const char *filename, ns_server_t *server,
|
||||
server->cookiealg = ns_cookiealg_sha256;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -10214,10 +10256,10 @@ ns_server_dumpdb(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
||||
}
|
||||
if (ptr != NULL) {
|
||||
if (!found) {
|
||||
putstr(text, "view '");
|
||||
putstr(text, ptr);
|
||||
putstr(text, "' not found");
|
||||
putnull(text);
|
||||
CHECK(putstr(text, "view '"));
|
||||
CHECK(putstr(text, ptr));
|
||||
CHECK(putstr(text, "' not found"));
|
||||
CHECK(putnull(text));
|
||||
result = ISC_R_NOTFOUND;
|
||||
dumpdone(dctx, result);
|
||||
return (result);
|
||||
@@ -11501,9 +11543,15 @@ nzd_setkey(MDB_val *key, dns_name_t *name, char *namebuf, size_t buflen) {
|
||||
|
||||
static void
|
||||
dumpzone(void *arg, const char *buf, int len) {
|
||||
isc_buffer_t **text = arg;
|
||||
ns_dzarg_t *dzarg = arg;
|
||||
isc_result_t result;
|
||||
|
||||
putmem(text, buf, len);
|
||||
REQUIRE(dzarg != NULL && ISC_MAGIC_VALID(dzarg, DZARG_MAGIC));
|
||||
|
||||
result = putmem(dzarg->text, buf, len);
|
||||
if (result != ISC_R_SUCCESS && dzarg->result == ISC_R_SUCCESS) {
|
||||
dzarg->result = result;
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
@@ -11517,6 +11565,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
|
||||
isc_buffer_t *text = NULL;
|
||||
char namebuf[1024];
|
||||
MDB_val key, data;
|
||||
ns_dzarg_t dzarg;
|
||||
|
||||
view = dns_zone_getview(zone);
|
||||
|
||||
@@ -11568,7 +11617,21 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &text);
|
||||
dzarg.magic = DZARG_MAGIC;
|
||||
dzarg.text = &text;
|
||||
dzarg.result = ISC_R_SUCCESS;
|
||||
cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &dzarg);
|
||||
if (dzarg.result != ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx,
|
||||
NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_SERVER,
|
||||
ISC_LOG_ERROR,
|
||||
"Error writing zone config to "
|
||||
"buffer in nzd_save(): %s",
|
||||
isc_result_totext(result));
|
||||
result = dzarg.result;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
data.mv_data = isc_buffer_base(text);
|
||||
data.mv_size = isc_buffer_usedlength(text);
|
||||
@@ -11847,6 +11910,7 @@ migrate_nzf(dns_view_t *view) {
|
||||
MDB_txn *txn = NULL;
|
||||
MDB_dbi dbi;
|
||||
MDB_val key, data;
|
||||
ns_dzarg_t dzarg;
|
||||
|
||||
/*
|
||||
* If NZF file doesn't exist, or NZD DB exists and already
|
||||
@@ -11936,7 +12000,21 @@ migrate_nzf(dns_view_t *view) {
|
||||
}
|
||||
|
||||
isc_buffer_clear(text);
|
||||
cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &text);
|
||||
dzarg.magic = DZARG_MAGIC;
|
||||
dzarg.text = &text;
|
||||
dzarg.result = ISC_R_SUCCESS;
|
||||
cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &dzarg);
|
||||
if (dzarg.result != ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx,
|
||||
NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_SERVER,
|
||||
ISC_LOG_ERROR,
|
||||
"Error writing zone config to "
|
||||
"buffer in migrate_nzf(): %s",
|
||||
isc_result_totext(result));
|
||||
result = dzarg.result;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
data.mv_data = isc_buffer_base(text);
|
||||
data.mv_size = isc_buffer_usedlength(text);
|
||||
@@ -12005,7 +12083,7 @@ newzone_parse(ns_server_t *server, char *command, dns_view_t **viewp,
|
||||
const char *viewname = NULL;
|
||||
dns_rdataclass_t rdclass;
|
||||
dns_view_t *view = NULL;
|
||||
const char *bn;
|
||||
const char *bn = NULL;
|
||||
|
||||
REQUIRE(viewp != NULL && *viewp == NULL);
|
||||
REQUIRE(zoneobjp != NULL && *zoneobjp == NULL);
|
||||
@@ -12015,12 +12093,14 @@ newzone_parse(ns_server_t *server, char *command, dns_view_t **viewp,
|
||||
isc_buffer_init(&argbuf, command, (unsigned int) strlen(command));
|
||||
isc_buffer_add(&argbuf, strlen(command));
|
||||
|
||||
if (strncasecmp(command, "add", 3) == 0)
|
||||
if (strncasecmp(command, "add", 3) == 0) {
|
||||
bn = "addzone";
|
||||
else if (strncasecmp(command, "mod", 3) == 0)
|
||||
} else if (strncasecmp(command, "mod", 3) == 0) {
|
||||
bn = "modzone";
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert the "addzone" or "modzone" to just "zone", for
|
||||
@@ -12978,8 +13058,14 @@ find_name_in_list_from_map(const cfg_obj_t *config,
|
||||
|
||||
static void
|
||||
emitzone(void *arg, const char *buf, int len) {
|
||||
isc_buffer_t **tpp = arg;
|
||||
putmem(tpp, buf, len);
|
||||
ns_dzarg_t *dzarg = arg;
|
||||
isc_result_t result;
|
||||
|
||||
REQUIRE(dzarg != NULL && ISC_MAGIC_VALID(dzarg, DZARG_MAGIC));
|
||||
result = putmem(dzarg->text, buf, len);
|
||||
if (result != ISC_R_SUCCESS && dzarg->result == ISC_R_SUCCESS) {
|
||||
dzarg->result = result;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -12998,6 +13084,7 @@ ns_server_showzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
||||
#ifdef HAVE_LMDB
|
||||
cfg_obj_t *nzconfig = NULL;
|
||||
#endif /* HAVE_LMDB */
|
||||
ns_dzarg_t dzarg;
|
||||
|
||||
/* Parse parameters */
|
||||
CHECK(zone_from_args(server, lex, NULL, &zone, zonename,
|
||||
@@ -13050,9 +13137,14 @@ ns_server_showzone(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
||||
if (zconfig == NULL)
|
||||
CHECK(ISC_R_NOTFOUND);
|
||||
|
||||
putstr(text, "zone ");
|
||||
cfg_printx(zconfig, CFG_PRINTER_ONELINE, emitzone, text);
|
||||
putstr(text, ";");
|
||||
CHECK(putstr(text, "zone "));
|
||||
dzarg.magic = DZARG_MAGIC;
|
||||
dzarg.text = text;
|
||||
dzarg.result = ISC_R_SUCCESS;
|
||||
cfg_printx(zconfig, CFG_PRINTER_ONELINE, emitzone, &dzarg);
|
||||
CHECK(dzarg.result);
|
||||
|
||||
CHECK(putstr(text, ";"));
|
||||
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
@@ -13442,8 +13534,8 @@ ns_server_zonestatus(ns_server_t *server, isc_lex_t *lex,
|
||||
|
||||
/* Security */
|
||||
secure = dns_db_issecure(db);
|
||||
allow = (dns_zone_getkeyopts(zone) & DNS_ZONEKEY_ALLOW);
|
||||
maintain = (dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN);
|
||||
allow = ((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_ALLOW) != 0);
|
||||
maintain = ((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_MAINTAIN) != 0);
|
||||
|
||||
/* Master files */
|
||||
file = dns_zone_getfile(mayberaw);
|
||||
@@ -13888,7 +13980,7 @@ ns_server_nta(ns_server_t *server, isc_lex_t *lex, bool readonly,
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(putnull(text));
|
||||
(void) putnull(text);
|
||||
|
||||
cleanup:
|
||||
if (msg != NULL) {
|
||||
@@ -14030,7 +14122,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) {
|
||||
snprintf(buf, sizeof(buf), "\n\talgorithm: %s", alg);
|
||||
CHECK(putstr(text, buf));
|
||||
|
||||
revoked = (kd.flags & DNS_KEYFLAG_REVOKE);
|
||||
revoked = ((kd.flags & DNS_KEYFLAG_REVOKE) != 0);
|
||||
snprintf(buf, sizeof(buf), "\n\tflags:%s%s%s",
|
||||
revoked ? " REVOKE" : "",
|
||||
((kd.flags & DNS_KEYFLAG_KSK) != 0)
|
||||
@@ -14122,21 +14214,23 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
||||
|
||||
/* Skip rndc command name */
|
||||
cmd = next_token(lex, text);
|
||||
if (cmd == NULL)
|
||||
if (cmd == NULL) {
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
}
|
||||
|
||||
/* Get managed-keys subcommand */
|
||||
cmd = next_token(lex, text);
|
||||
if (cmd == NULL)
|
||||
if (cmd == NULL) {
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
}
|
||||
|
||||
if (strcasecmp(cmd, "status") == 0)
|
||||
if (strcasecmp(cmd, "status") == 0) {
|
||||
opt = STATUS;
|
||||
else if (strcasecmp(cmd, "refresh") == 0)
|
||||
} else if (strcasecmp(cmd, "refresh") == 0) {
|
||||
opt = REFRESH;
|
||||
else if (strcasecmp(cmd, "sync") == 0)
|
||||
} else if (strcasecmp(cmd, "sync") == 0) {
|
||||
opt = SYNC;
|
||||
else {
|
||||
} else {
|
||||
snprintf(msg, sizeof(msg), "unknown command '%s'", cmd);
|
||||
(void) putstr(text, msg);
|
||||
result = ISC_R_UNEXPECTED;
|
||||
@@ -14146,29 +14240,17 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
||||
/* Look for the optional class name. */
|
||||
classtxt = next_token(lex, text);
|
||||
if (classtxt != NULL) {
|
||||
/* Look for the optional view name. */
|
||||
viewtxt = next_token(lex, text);
|
||||
}
|
||||
|
||||
if (classtxt == NULL) {
|
||||
rdclass = dns_rdataclass_in;
|
||||
} else {
|
||||
isc_textregion_t r;
|
||||
r.base = classtxt;
|
||||
r.length = strlen(classtxt);
|
||||
result = dns_rdataclass_fromtext(&rdclass, &r);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (viewtxt == NULL) {
|
||||
rdclass = dns_rdataclass_in;
|
||||
viewtxt = classtxt;
|
||||
result = ISC_R_SUCCESS;
|
||||
} else {
|
||||
snprintf(msg, sizeof(msg),
|
||||
"unknown class '%s'", classtxt);
|
||||
(void) putstr(text, msg);
|
||||
goto cleanup;
|
||||
}
|
||||
snprintf(msg, sizeof(msg),
|
||||
"unknown class '%s'", classtxt);
|
||||
(void) putstr(text, msg);
|
||||
goto cleanup;
|
||||
}
|
||||
viewtxt = next_token(lex, text);
|
||||
}
|
||||
|
||||
for (view = ISC_LIST_HEAD(server->viewlist);
|
||||
@@ -14178,7 +14260,9 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
||||
if (viewtxt != NULL &&
|
||||
(rdclass != view->rdclass ||
|
||||
strcmp(view->name, viewtxt) != 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (view->managed_keys == NULL) {
|
||||
if (viewtxt != NULL) {
|
||||
@@ -14186,35 +14270,44 @@ ns_server_mkeys(ns_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
||||
"view '%s': no managed keys", viewtxt);
|
||||
CHECK(putstr(text, msg));
|
||||
goto cleanup;
|
||||
} else
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
found = true;
|
||||
|
||||
switch (opt) {
|
||||
case REFRESH:
|
||||
if (!first) {
|
||||
CHECK(putstr(text, "\n"));
|
||||
}
|
||||
CHECK(mkey_refresh(view, text));
|
||||
break;
|
||||
case STATUS:
|
||||
if (!first)
|
||||
if (!first) {
|
||||
CHECK(putstr(text, "\n\n"));
|
||||
}
|
||||
CHECK(mkey_status(view, text));
|
||||
first = false;
|
||||
break;
|
||||
case SYNC:
|
||||
CHECK(dns_zone_flush(view->managed_keys));
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (viewtxt != NULL)
|
||||
if (viewtxt != NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
if (!found) {
|
||||
CHECK(putstr(text, "no views with managed keys"));
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (isc_buffer_usedlength(*text) > 0)
|
||||
|
||||
@@ -259,7 +259,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
|
||||
/* Open the library */
|
||||
dlopen_flags = RTLD_NOW|RTLD_GLOBAL;
|
||||
|
||||
#ifdef RTLD_DEEPBIND
|
||||
#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__
|
||||
/*
|
||||
* If RTLD_DEEPBIND is available then use it. This can avoid
|
||||
* issues with a module using a different version of a system
|
||||
|
||||
+24
-12
@@ -267,24 +267,34 @@ update_log(ns_client_t *client, dns_zone_t *zone,
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
char classbuf[DNS_RDATACLASS_FORMATSIZE];
|
||||
|
||||
if (client == NULL || zone == NULL)
|
||||
if (client == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isc_log_wouldlog(ns_g_lctx, level) == false)
|
||||
if (isc_log_wouldlog(ns_g_lctx, level) == false) {
|
||||
return;
|
||||
|
||||
dns_name_format(dns_zone_getorigin(zone), namebuf,
|
||||
sizeof(namebuf));
|
||||
dns_rdataclass_format(dns_zone_getclass(zone), classbuf,
|
||||
sizeof(classbuf));
|
||||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(message, sizeof(message), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
ns_client_log(client, NS_LOGCATEGORY_UPDATE, NS_LOGMODULE_UPDATE,
|
||||
level, "updating zone '%s/%s': %s",
|
||||
namebuf, classbuf, message);
|
||||
if (zone != NULL) {
|
||||
dns_name_format(dns_zone_getorigin(zone), namebuf,
|
||||
sizeof(namebuf));
|
||||
dns_rdataclass_format(dns_zone_getclass(zone), classbuf,
|
||||
sizeof(classbuf));
|
||||
|
||||
ns_client_log(client, NS_LOGCATEGORY_UPDATE,
|
||||
NS_LOGMODULE_UPDATE,
|
||||
level, "updating zone '%s/%s': %s",
|
||||
namebuf, classbuf, message);
|
||||
} else {
|
||||
ns_client_log(client, NS_LOGCATEGORY_UPDATE,
|
||||
NS_LOGMODULE_UPDATE,
|
||||
level, "%s", message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -786,8 +796,10 @@ static isc_result_t
|
||||
cname_compatibility_action(void *data, dns_rdataset_t *rrset) {
|
||||
UNUSED(data);
|
||||
if (rrset->type != dns_rdatatype_cname &&
|
||||
! dns_rdatatype_isdnssec(rrset->type))
|
||||
! dns_rdatatype_atcname(rrset->type))
|
||||
{
|
||||
return (ISC_R_EXISTS);
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -2834,7 +2846,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
|
||||
dns_rdatatype_cname, 0,
|
||||
&flag));
|
||||
if (flag &&
|
||||
! dns_rdatatype_isdnssec(rdata.type))
|
||||
! dns_rdatatype_atcname(rdata.type))
|
||||
{
|
||||
update_log(client, zone,
|
||||
LOGLEVEL_PROTOCOL,
|
||||
|
||||
+2
-2
@@ -765,7 +765,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
break;
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
ns_client_log(client,
|
||||
@@ -1281,7 +1281,7 @@ sendstream(xfrout_ctx_t *xfr) {
|
||||
isc_buffer_clear(&xfr->txlenbuf);
|
||||
isc_buffer_clear(&xfr->txbuf);
|
||||
|
||||
is_tcp = (xfr->client->attributes & NS_CLIENTATTR_TCP);
|
||||
is_tcp = ((xfr->client->attributes & NS_CLIENTATTR_TCP) != 0);
|
||||
if (!is_tcp) {
|
||||
/*
|
||||
* In the UDP case, we put the response data directly into
|
||||
|
||||
+66
-37
@@ -122,7 +122,7 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
return (ISC_R_FAILURE);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/* First check to see if ACL is defined within the zone */
|
||||
@@ -228,12 +228,14 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
|
||||
unsigned int i, n;
|
||||
|
||||
str = cfg_obj_asstring(mode);
|
||||
if (strcasecmp(str, "grant") == 0)
|
||||
if (strcasecmp(str, "grant") == 0) {
|
||||
grant = true;
|
||||
else if (strcasecmp(str, "deny") == 0)
|
||||
} else if (strcasecmp(str, "deny") == 0) {
|
||||
grant = false;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
str = cfg_obj_asstring(matchtype);
|
||||
CHECK(dns_ssu_mtypefromstring(str, &mtype));
|
||||
@@ -753,6 +755,7 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
|
||||
case dns_zone_master: zone = "master"; break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
result = ns_checknames_get(maps, zone, objp);
|
||||
INSIST(result == ISC_R_SUCCESS && objp != NULL && *objp != NULL);
|
||||
@@ -796,7 +799,7 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
const dns_master_style_t *masterstyle = &dns_master_style_default;
|
||||
isc_stats_t *zoneqrystats;
|
||||
dns_stats_t *rcvquerystats;
|
||||
dns_zonestat_level_t statlevel;
|
||||
dns_zonestat_level_t statlevel = dns_zonestat_none;
|
||||
int seconds;
|
||||
dns_zone_t *mayberaw = (raw != NULL) ? raw : zone;
|
||||
isc_dscp_t dscp;
|
||||
@@ -920,14 +923,16 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
const char *masterformatstr = cfg_obj_asstring(obj);
|
||||
|
||||
if (strcasecmp(masterformatstr, "text") == 0)
|
||||
if (strcasecmp(masterformatstr, "text") == 0) {
|
||||
masterformat = dns_masterformat_text;
|
||||
else if (strcasecmp(masterformatstr, "raw") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
||||
masterformat = dns_masterformat_raw;
|
||||
else if (strcasecmp(masterformatstr, "map") == 0)
|
||||
} else if (strcasecmp(masterformatstr, "map") == 0) {
|
||||
masterformat = dns_masterformat_map;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -943,12 +948,14 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
if (strcasecmp(masterstylestr, "full") == 0)
|
||||
if (strcasecmp(masterstylestr, "full") == 0) {
|
||||
masterstyle = &dns_master_style_full;
|
||||
else if (strcasecmp(masterstylestr, "relative") == 0)
|
||||
} else if (strcasecmp(masterstylestr, "relative") == 0) {
|
||||
masterstyle = &dns_master_style_default;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -1034,16 +1041,18 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
dialup = dns_dialuptype_no;
|
||||
} else {
|
||||
const char *dialupstr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(dialupstr, "notify") == 0)
|
||||
if (strcasecmp(dialupstr, "notify") == 0) {
|
||||
dialup = dns_dialuptype_notify;
|
||||
else if (strcasecmp(dialupstr, "notify-passive") == 0)
|
||||
} else if (strcasecmp(dialupstr, "notify-passive") == 0) {
|
||||
dialup = dns_dialuptype_notifypassive;
|
||||
else if (strcasecmp(dialupstr, "refresh") == 0)
|
||||
} else if (strcasecmp(dialupstr, "refresh") == 0) {
|
||||
dialup = dns_dialuptype_refresh;
|
||||
else if (strcasecmp(dialupstr, "passive") == 0)
|
||||
} else if (strcasecmp(dialupstr, "passive") == 0) {
|
||||
dialup = dns_dialuptype_passive;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (raw != NULL)
|
||||
dns_zone_setdialup(raw, dialup);
|
||||
@@ -1059,14 +1068,16 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
statlevel = dns_zonestat_none;
|
||||
} else {
|
||||
const char *levelstr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(levelstr, "full") == 0)
|
||||
if (strcasecmp(levelstr, "full") == 0) {
|
||||
statlevel = dns_zonestat_full;
|
||||
else if (strcasecmp(levelstr, "terse") == 0)
|
||||
} else if (strcasecmp(levelstr, "terse") == 0) {
|
||||
statlevel = dns_zonestat_terse;
|
||||
else if (strcasecmp(levelstr, "none") == 0)
|
||||
} else if (strcasecmp(levelstr, "none") == 0) {
|
||||
statlevel = dns_zonestat_none;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
dns_zone_setstatlevel(zone, statlevel);
|
||||
|
||||
@@ -1104,12 +1115,14 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
notifytype = dns_notifytype_no;
|
||||
} else {
|
||||
const char *notifystr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(notifystr, "explicit") == 0)
|
||||
if (strcasecmp(notifystr, "explicit") == 0) {
|
||||
notifytype = dns_notifytype_explicit;
|
||||
else if (strcasecmp(notifystr, "master-only") == 0)
|
||||
} else if (strcasecmp(notifystr, "master-only") == 0) {
|
||||
notifytype = dns_notifytype_masteronly;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (raw != NULL)
|
||||
dns_zone_setnotifytype(raw, dns_notifytype_no);
|
||||
@@ -1250,8 +1263,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
fail = check = true;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
if (raw != NULL) {
|
||||
dns_zone_setoption(raw, DNS_ZONEOPT_CHECKNAMES,
|
||||
check);
|
||||
@@ -1286,8 +1301,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
check = true;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
check = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_CHECKSPF, check);
|
||||
|
||||
obj = NULL;
|
||||
@@ -1424,14 +1441,16 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
result = cfg_map_get(zoptions, "auto-dnssec", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
const char *arg = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(arg, "allow") == 0)
|
||||
if (strcasecmp(arg, "allow") == 0) {
|
||||
allow = true;
|
||||
else if (strcasecmp(arg, "maintain") == 0)
|
||||
} else if (strcasecmp(arg, "maintain") == 0) {
|
||||
allow = maint = true;
|
||||
else if (strcasecmp(arg, "off") == 0)
|
||||
} else if (strcasecmp(arg, "off") == 0) {
|
||||
;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, allow);
|
||||
dns_zone_setkeyopt(zone, DNS_ZONEKEY_MAINTAIN, maint);
|
||||
}
|
||||
@@ -1482,8 +1501,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
fail = check = true;
|
||||
} else if (strcasecmp(dupcheck, "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRR, check);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKDUPRRFAIL, fail);
|
||||
|
||||
@@ -1497,8 +1518,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
fail = check = true;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
fail = check = false;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMX, check);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_CHECKMXFAIL, fail);
|
||||
|
||||
@@ -1533,8 +1556,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
warn = ignore = false;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
warn = ignore = true;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNMXCNAME, warn);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNOREMXCNAME, ignore);
|
||||
|
||||
@@ -1548,8 +1573,10 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
warn = ignore = false;
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||
warn = ignore = true;
|
||||
} else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_WARNSRVCNAME, warn);
|
||||
dns_zone_setoption(mayberaw, DNS_ZONEOPT_IGNORESRVCNAME,
|
||||
ignore);
|
||||
@@ -1564,13 +1591,15 @@ ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
result = cfg_map_get(zoptions, "dnssec-update-mode", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
const char *arg = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(arg, "no-resign") == 0)
|
||||
if (strcasecmp(arg, "no-resign") == 0) {
|
||||
dns_zone_setkeyopt(zone, DNS_ZONEKEY_NORESIGN,
|
||||
true);
|
||||
else if (strcasecmp(arg, "maintain") == 0)
|
||||
} else if (strcasecmp(arg, "maintain") == 0) {
|
||||
;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
|
||||
+12
-2
@@ -158,8 +158,8 @@ static dns_fixedname_t fuserzone;
|
||||
static dns_fixedname_t fzname;
|
||||
static dns_name_t *userzone = NULL;
|
||||
static dns_name_t *zname = NULL;
|
||||
static dns_name_t tmpzonename;
|
||||
static dns_name_t restart_master;
|
||||
static dns_name_t tmpzonename = DNS_NAME_INITEMPTY;
|
||||
static dns_name_t restart_master = DNS_NAME_INITEMPTY;
|
||||
static dns_tsig_keyring_t *gssring = NULL;
|
||||
static dns_tsigkey_t *tsigkey = NULL;
|
||||
static dst_key_t *sig0key = NULL;
|
||||
@@ -2403,6 +2403,8 @@ update_completed(isc_task_t *task, isc_event_t *event) {
|
||||
if (usegsstsig) {
|
||||
dns_name_free(&tmpzonename, gmctx);
|
||||
dns_name_free(&restart_master, gmctx);
|
||||
dns_name_init(&tmpzonename, 0);
|
||||
dns_name_init(&restart_master, 0);
|
||||
}
|
||||
isc_event_free(&event);
|
||||
done_update();
|
||||
@@ -2818,6 +2820,8 @@ failed_gssrequest() {
|
||||
|
||||
dns_name_free(&tmpzonename, gmctx);
|
||||
dns_name_free(&restart_master, gmctx);
|
||||
dns_name_init(&tmpzonename, NULL);
|
||||
dns_name_init(&restart_master, NULL);
|
||||
|
||||
done_update();
|
||||
}
|
||||
@@ -3226,6 +3230,12 @@ cleanup(void) {
|
||||
isc_mem_free(gmctx, realm);
|
||||
realm = NULL;
|
||||
}
|
||||
if (dns_name_dynamic(&tmpzonename)) {
|
||||
dns_name_free(&tmpzonename, gmctx);
|
||||
}
|
||||
if (dns_name_dynamic(&restart_master)) {
|
||||
dns_name_free(&restart_master, gmctx);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (sig0key != NULL)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
* Create a key in the keystore of an HSM
|
||||
*
|
||||
* The calculation of key tag is left to the script
|
||||
* that converts the key into a DNSKEY RR and inserts
|
||||
* that converts the key into a DNSKEY RR and inserts
|
||||
* it into a zone file.
|
||||
*
|
||||
* usage:
|
||||
@@ -432,10 +432,10 @@ main(int argc, char *argv[]) {
|
||||
|
||||
break;
|
||||
case key_ecx:
|
||||
#ifndef CKM_EDDSA_KEY_PAIR_GEN
|
||||
#if !defined(CKM_EDDSA_KEY_PAIR_GEN)
|
||||
fprintf(stderr, "CKM_EDDSA_KEY_PAIR_GEN is not defined\n");
|
||||
usage();
|
||||
#endif
|
||||
#else
|
||||
op_type = OP_EC;
|
||||
if (bits == 0)
|
||||
bits = 256;
|
||||
@@ -454,16 +454,27 @@ main(int argc, char *argv[]) {
|
||||
id_offset = ECC_ID;
|
||||
|
||||
if (bits == 256) {
|
||||
#if HAVE_PKCS11_ED25519
|
||||
public_template[4].pValue = pk11_ecc_ed25519;
|
||||
public_template[4].ulValueLen =
|
||||
sizeof(pk11_ecc_ed25519);
|
||||
#else
|
||||
fprintf(stderr, "Ed25519 is not supported\n");
|
||||
usage();
|
||||
#endif
|
||||
} else {
|
||||
#if HAVE_PKCS11_ED448
|
||||
public_template[4].pValue = pk11_ecc_ed448;
|
||||
public_template[4].ulValueLen =
|
||||
sizeof(pk11_ecc_ed448);
|
||||
#else
|
||||
fprintf(stderr, "Ed449 is not supported\n");
|
||||
usage();
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
#endif /* !defined(CKM_EDDSA_KEY_PAIR_GEN) */
|
||||
case key_dsa:
|
||||
op_type = OP_DSA;
|
||||
if (bits == 0)
|
||||
@@ -527,7 +538,7 @@ main(int argc, char *argv[]) {
|
||||
case key_unknown:
|
||||
usage();
|
||||
}
|
||||
|
||||
|
||||
search_template[0].pValue = label;
|
||||
search_template[0].ulValueLen = strlen((char *)label);
|
||||
public_template[0].pValue = label;
|
||||
@@ -584,7 +595,7 @@ main(int argc, char *argv[]) {
|
||||
hSession = pctx.session;
|
||||
|
||||
/* check if a key with the same id already exists */
|
||||
rv = pkcs_C_FindObjectsInit(hSession, search_template, 1);
|
||||
rv = pkcs_C_FindObjectsInit(hSession, search_template, 1);
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr, "C_FindObjectsInit: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
@@ -714,13 +725,13 @@ main(int argc, char *argv[]) {
|
||||
public_template, public_attrcnt,
|
||||
private_template, private_attrcnt,
|
||||
&publickey, &privatekey);
|
||||
|
||||
|
||||
if (rv != CKR_OK) {
|
||||
fprintf(stderr, "C_GenerateKeyPair: Error = 0x%.8lX\n", rv);
|
||||
error = 1;
|
||||
} else if (!quiet)
|
||||
printf("Key pair generation complete.\n");
|
||||
|
||||
|
||||
exit_params:
|
||||
/* Free parameter attributes */
|
||||
if (keyclass == key_dsa || keyclass == key_dh) {
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pk11destroy"=".\pk11destroy.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pk11destroy"=".\pk11destroy.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pk11keygen"=".\pk11keygen.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pk11keygen"=".\pk11keygen.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pk11list"=".\pk11list.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pk11list"=".\pk11list.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pk11tokens"=".\pk11tokens.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "pk11tokens"=".\pk11tokens.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
+23
-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
|
||||
@@ -69,6 +69,10 @@ will search the key directory (either the current working directory or the direc
|
||||
\fB\-K\fR
|
||||
option), and check the keys for all the zones represented in the directory\&.
|
||||
.PP
|
||||
Key times that are in the past will not be updated unless the
|
||||
\fB\-f\fR
|
||||
is used (see below)\&. Key inactivation and deletion times that are less than five minutes in the future will be delayed by five minutes\&.
|
||||
.PP
|
||||
It is expected that this tool will be run automatically and unattended (for example, by
|
||||
\fBcron\fR)\&.
|
||||
.SH "OPTIONS"
|
||||
@@ -186,7 +190,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
|
||||
@@ -199,59 +204,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 1024 bits for DSA keys and 2048 for RSA\&.
|
||||
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 1024 bits for DSA keys and 2048 for RSA\&.
|
||||
.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
|
||||
|
||||
@@ -66,11 +66,12 @@
|
||||
</para>
|
||||
<para>
|
||||
DNSSEC policy can be read from a configuration file (default
|
||||
<filename>/etc/dnssec-policy.conf</filename>), from which the key
|
||||
parameters, publication and rollover schedule, and desired
|
||||
coverage duration for any given zone can be determined. This
|
||||
<filename>/etc/dnssec-policy.conf</filename>), 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 "<literal>default</literal>" policy
|
||||
used for all zones.
|
||||
</para>
|
||||
<para>
|
||||
When <command>dnssec-keymgr</command> runs, it examines the DNSSEC
|
||||
@@ -100,6 +101,12 @@
|
||||
set by the <option>-K</option> option), and check the keys for
|
||||
all the zones represented in the directory.
|
||||
</para>
|
||||
<para>
|
||||
Key times that are in the past will not be updated unless
|
||||
the <option>-f</option> is used (see below). Key inactivation
|
||||
and deletion times that are less than five minutes in the future
|
||||
will be delayed by five minutes.
|
||||
</para>
|
||||
<para>
|
||||
It is expected that this tool will be run automatically and
|
||||
unattended (for example, by <command>cron</command>).
|
||||
@@ -252,7 +259,7 @@
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Algorithm policies:
|
||||
<emphasis>Algorithm policies:</emphasis>
|
||||
(<option>algorithm-policy <replaceable>algorithm</replaceable> { ... };</option> )
|
||||
override default per-algorithm settings. For example, by default,
|
||||
RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This
|
||||
@@ -262,11 +269,13 @@
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Zone policies:
|
||||
<emphasis>Zone policies:</emphasis>
|
||||
(<option>zone <replaceable>name</replaceable> { ... };</option> )
|
||||
set policy for a single zone by name. A zone policy can inherit
|
||||
a policy class by including a <option>policy</option> option.
|
||||
Zone names beginning with digits (i.e., 0-9) must be quoted.
|
||||
If a zone does not have its own policy then the
|
||||
"<literal>default</literal>" policy applies.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
@@ -275,7 +284,8 @@
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><command>algorithm</command></term>
|
||||
<term><command>algorithm</command>
|
||||
<replaceable>name</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key algorithm. If no policy is defined, the default is
|
||||
@@ -284,13 +294,14 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>coverage</command></term>
|
||||
<term><command>coverage</command>
|
||||
<replaceable>duration</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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.
|
||||
@@ -298,7 +309,8 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>directory</command></term>
|
||||
<term><command>directory</command>
|
||||
<replaceable>path</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the directory in which keys should be stored.
|
||||
@@ -306,11 +318,12 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>key-size</command></term>
|
||||
<term><command>key-size</command> <replaceable>keytype</replaceable>
|
||||
<replaceable>size</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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 1024 bits for DSA keys and 2048 for
|
||||
@@ -319,7 +332,8 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>keyttl</command></term>
|
||||
<term><command>keyttl</command>
|
||||
<replaceable>duration</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The key TTL. If no policy is defined, the default is one hour.
|
||||
@@ -327,46 +341,50 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>post-publish</command></term>
|
||||
<term><command>post-publish</command> <replaceable>keytype</replaceable>
|
||||
<replaceable>duration</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
How long after inactivation a key should be deleted from the zone.
|
||||
Note: If <option>roll-period</option> 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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>pre-publish</command></term>
|
||||
<term><command>pre-publish</command> <replaceable>keytype</replaceable>
|
||||
<replaceable>duration</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
How long before activation a key should be published. Note: If
|
||||
<option>roll-period</option> 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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>roll-period</command></term>
|
||||
<term><command>roll-period</command> <replaceable>keytype</replaceable>
|
||||
<replaceable>duration</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>standby</command></term>
|
||||
<term><command>standby</command> <replaceable>keytype</replaceable>
|
||||
<replaceable>number</replaceable><literal>;</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Not yet implemented.
|
||||
|
||||
@@ -58,11 +58,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
|
||||
@@ -92,6 +93,12 @@
|
||||
set by the <code class="option">-K</code> option), and check the keys for
|
||||
all the zones represented in the directory.
|
||||
</p>
|
||||
<p>
|
||||
Key times that are in the past will not be updated unless
|
||||
the <code class="option">-f</code> is used (see below). Key inactivation
|
||||
and deletion times that are less than five minutes in the future
|
||||
will be delayed by five minutes.
|
||||
</p>
|
||||
<p>
|
||||
It is expected that this tool will be run automatically and
|
||||
unattended (for example, by <span class="command"><strong>cron</strong></span>).
|
||||
@@ -214,7 +221,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
|
||||
@@ -224,11 +231,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>
|
||||
@@ -236,82 +245,91 @@
|
||||
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 1024 bits for DSA keys and 2048 for
|
||||
RSA.
|
||||
</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.
|
||||
|
||||
@@ -164,7 +164,7 @@ def parse_args():
|
||||
parser.add_argument('-D', '--dsfromkey', dest='dsfromkey',
|
||||
default=os.path.join(prefix(sbindir),
|
||||
'dnssec-dsfromkey'),
|
||||
type=str, help='path to \'dig\'')
|
||||
type=str, help='path to \'dnssec-dsfromkey\'')
|
||||
parser.add_argument('-v', '--version', action='version',
|
||||
version=version)
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -188,6 +188,10 @@ def parse_args():
|
||||
if args.filename and len(args.zone) > 1:
|
||||
fatal("ERROR: -f can only be used with one zone.")
|
||||
|
||||
# strip trailing dots if any
|
||||
args.zone = [x[:-1] if (len(x) > 1 and x[-1] == '.') else x
|
||||
for x in args.zone]
|
||||
|
||||
# convert from time arguments to seconds
|
||||
try:
|
||||
if args.maxttl:
|
||||
@@ -251,7 +255,7 @@ def main():
|
||||
print("PHASE 1--Loading keys to check for internal timing problems")
|
||||
|
||||
try:
|
||||
kd = keydict(path=args.path, zone=args.zone, keyttl=args.keyttl)
|
||||
kd = keydict(path=args.path, zones=args.zone, keyttl=args.keyttl)
|
||||
except Exception as e:
|
||||
fatal('ERROR: Unable to build key dictionary: ' + str(e))
|
||||
|
||||
|
||||
@@ -452,6 +452,10 @@ class dnskey:
|
||||
if timespan is None:
|
||||
timespan = self.ttl
|
||||
|
||||
if timespan is None:
|
||||
output("WARNING: Key %s using default TTL." % repr(self))
|
||||
timespan = (60*60*24)
|
||||
|
||||
now = time.time()
|
||||
d = self.delete()
|
||||
i = self.inactive()
|
||||
|
||||
@@ -73,7 +73,7 @@ class eventlist:
|
||||
kok = self.checkzone(z, "KSK", until, output)
|
||||
if not no_zsk and z in self._Z.keys():
|
||||
found = True
|
||||
kok = self.checkzone(z, "ZSK", until, output)
|
||||
zok = self.checkzone(z, "ZSK", until, output)
|
||||
|
||||
if not found:
|
||||
output("ERROR: No key events found")
|
||||
|
||||
@@ -49,15 +49,18 @@ class keydict:
|
||||
self._keydict[key.name][key.alg][key.keyid] = key
|
||||
|
||||
def readone(self, path, zone):
|
||||
match='K' + zone + '.+*.private'
|
||||
if not zone.endswith('.'):
|
||||
zone += '.'
|
||||
match='K' + zone + '+*.private'
|
||||
files = glob.glob(os.path.join(path, match))
|
||||
|
||||
found = False
|
||||
for infile in files:
|
||||
key = dnskey(infile, path, self._defttl)
|
||||
if key.name != zone: # shouldn't ever happen
|
||||
if key.fullname != zone: # shouldn't ever happen
|
||||
continue
|
||||
self._keydict[key.name][key.alg][key.keyid] = key
|
||||
keyname=key.name if zone != '.' else '.'
|
||||
self._keydict[keyname][key.alg][key.keyid] = key
|
||||
found = True
|
||||
|
||||
return found
|
||||
|
||||
@@ -77,15 +77,44 @@ class keyseries:
|
||||
a = key.activate()
|
||||
if not p or p > now:
|
||||
key.setpublish(now)
|
||||
p = now
|
||||
if not a or a > now:
|
||||
key.setactivate(now)
|
||||
a = now
|
||||
|
||||
i = key.inactive()
|
||||
fudge = 300
|
||||
if not rp:
|
||||
key.setinactive(None, **kwargs)
|
||||
key.setdelete(None, **kwargs)
|
||||
elif not i or a + rp != i:
|
||||
if not i and a + rp > now + prepub + fudge:
|
||||
key.setinactive(a + rp, **kwargs)
|
||||
key.setdelete(a + rp + postpub, **kwargs)
|
||||
elif not i:
|
||||
key.setinactive(now + prepub + fudge, **kwargs)
|
||||
key.setdelete(now + prepub + postpub + fudge, **kwargs)
|
||||
elif i < now:
|
||||
pass
|
||||
elif a + rp > i:
|
||||
key.setinactive(a + rp, **kwargs)
|
||||
key.setdelete(a + rp + postpub, **kwargs)
|
||||
elif a + rp > now + prepub + fudge:
|
||||
key.setinactive(a + rp, **kwargs)
|
||||
key.setdelete(a + rp + postpub, **kwargs)
|
||||
else:
|
||||
key.setinactive(now + prepub + fudge, **kwargs)
|
||||
key.setdelete(now + prepub + postpub + fudge, **kwargs)
|
||||
else:
|
||||
key.setinactive(a + rp, **kwargs)
|
||||
key.setdelete(a + rp + postpub, **kwargs)
|
||||
d = key.delete()
|
||||
if not d or i + postpub > now + fudge:
|
||||
key.setdelete(i + postpub, **kwargs)
|
||||
elif not d:
|
||||
key.setdelete(now + postpub + fudge, **kwargs)
|
||||
elif d < now + fudge:
|
||||
pass
|
||||
elif d < i + postpub:
|
||||
key.setdelete(i + postpub, **kwargs)
|
||||
|
||||
if policy.keyttl != key.ttl:
|
||||
key.setttl(policy.keyttl)
|
||||
|
||||
+29
-29
@@ -1,29 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "rndcutil"=".\rndcutil.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "rndcutil"=".\rndcutil.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# this server runs named with only one worker thread
|
||||
-m record,size,mctx -c named.conf -d 99 -X named.lock -g -T clienttest -n 1
|
||||
-m record,size,mctx -c named.conf -d 99 -D additional-ns1 -X named.lock -g -T clienttest -n 1
|
||||
|
||||
@@ -380,7 +380,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "reconfiguring server with multiple views"
|
||||
rm -f ns2/named.conf
|
||||
rm -f ns2/named.conf
|
||||
copy_setports ns2/named2.conf.in ns2/named.conf
|
||||
$RNDCCMD 10.53.0.2 reconfig 2>&1 | sed 's/^/ns2 /' | cat_i
|
||||
sleep 5
|
||||
@@ -527,8 +527,8 @@ echo_i "check that named restarts with multiple added zones ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.3 addzone "test4.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.3 addzone "test5.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1
|
||||
$PERL $SYSTEMTESTTOP/stop.pl . ns3
|
||||
$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 || ret=1
|
||||
$PERL $SYSTEMTESTTOP/stop.pl addzone ns3
|
||||
$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} addzone ns3 || ret=1
|
||||
$DIG $DIGOPTS @10.53.0.3 version.bind txt ch > dig.out.test$n || ret=1
|
||||
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# this server only has 127.0.0.1 in its localhost/localnets ACLs
|
||||
-m record,size,mctx -c named.conf -d 99 -X named.lock -g -T clienttest -T fixedlocal
|
||||
-m record,size,mctx -c named.conf -d 99 -D allow-query-ns3 -X named.lock -g -T clienttest -T fixedlocal
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
rm -f */K* */dsset-* */*.signed */trusted.conf */tmp* */*.jnl */*.bk
|
||||
rm -f */core
|
||||
rm -f */example.bk
|
||||
rm -f */named.conf
|
||||
rm -f */named.memstats
|
||||
rm -f */named.run
|
||||
rm -f */named.conf
|
||||
@@ -23,6 +24,7 @@ rm -f digcomp.out.test*
|
||||
rm -f digcomp.out.test*
|
||||
rm -f missingzsk.key inactivezsk.key
|
||||
rm -f nopriv.key vanishing.key del1.key del2.key
|
||||
rm -f ns*/managed-keys.bind*
|
||||
rm -f ns*/named.lock
|
||||
rm -f ns*/named.lock
|
||||
rm -f ns1/root.db
|
||||
@@ -31,11 +33,12 @@ rm -f ns2/private.secure.example.db ns2/bar.db
|
||||
rm -f ns3/*.nzd ns3/*.nzd-lock ns3/*.nzf
|
||||
rm -f ns3/*.nzf
|
||||
rm -f ns3/autonsec3.example.db
|
||||
rm -f ns3/delzsk.example.db
|
||||
rm -f ns3/dname-at-apex-nsec3.example.db
|
||||
rm -f ns3/inacksk2.example.db
|
||||
rm -f ns3/inacksk3.example.db
|
||||
rm -f ns3/inaczsk2.example.db
|
||||
rm -f ns3/inaczsk3.example.db
|
||||
rm -f ns3/delzsk.example.db
|
||||
rm -f ns3/kg.out ns3/s.out ns3/st.out
|
||||
rm -f ns3/nozsk.example.db ns3/inaczsk.example.db
|
||||
rm -f ns3/nsec.example.db
|
||||
|
||||
@@ -82,3 +82,5 @@ ns.nsec3-to-nsec A 10.53.0.3
|
||||
|
||||
oldsigs NS ns.oldsigs
|
||||
ns.oldsigs A 10.53.0.3
|
||||
|
||||
dname-at-apex-nsec3 NS ns3
|
||||
|
||||
@@ -15,7 +15,8 @@ SYSTEMTESTTOP=../..
|
||||
# Have the child generate subdomain keys and pass DS sets to us.
|
||||
( cd ../ns3 && $SHELL keygen.sh )
|
||||
|
||||
for subdomain in secure nsec3 autonsec3 optout rsasha256 rsasha512 nsec3-to-nsec oldsigs sync
|
||||
for subdomain in secure nsec3 autonsec3 optout rsasha256 rsasha512 nsec3-to-nsec oldsigs sync \
|
||||
dname-at-apex-nsec3
|
||||
do
|
||||
cp ../ns3/dsset-$subdomain.example$TP .
|
||||
done
|
||||
|
||||
@@ -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 600
|
||||
@ SOA ns3.example. . 1 1200 1200 1814400 3600
|
||||
@ NS ns3.example.
|
||||
@ DNAME example.
|
||||
@ NSEC3PARAM 1 0 0 -
|
||||
@@ -15,8 +15,8 @@ SYSTEMTESTTOP=../..
|
||||
SYSTESTDIR=autosign
|
||||
|
||||
dumpit () {
|
||||
echo "D:${debug}: dumping ${1}"
|
||||
cat "${1}" | sed 's/^/D:/'
|
||||
echo_d "${debug}: dumping ${1}"
|
||||
cat "${1}" | cat_d
|
||||
}
|
||||
|
||||
setup () {
|
||||
@@ -316,3 +316,12 @@ ksk=`$KEYGEN -a NSEC3RSASHA1 -b 1024 -3 -q -r $RANDFILE -fk $zone 2> kg.out` ||
|
||||
$KEYGEN -a NSEC3RSASHA1 -b 1024 -3 -q -r $RANDFILE $zone > kg.out 2>&1 || dumpit kg.out
|
||||
zsk=`$KEYGEN -a NSEC3RSASHA1 -b 1024 -3 -q -r $RANDFILE -I now-1w $zone 2>kg.out` || dumpit kg.out
|
||||
echo $zsk > ../delzsk.key
|
||||
|
||||
#
|
||||
# Check that NSEC3 are correctly signed and returned from below a DNAME
|
||||
#
|
||||
setup dname-at-apex-nsec3.example
|
||||
cp $infile $zonefile
|
||||
ksk=`$KEYGEN -q -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -3 -fk $zone 2> kg.out` || dumpit kg.out
|
||||
$KEYGEN -q -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -3 $zone > kg.out 2>&1 || dumpit kg.out
|
||||
$DSFROMKEY $ksk.key > dsset-${zone}$TP
|
||||
|
||||
@@ -281,4 +281,11 @@ zone "delzsk.example." {
|
||||
auto-dnssec maintain;
|
||||
};
|
||||
|
||||
zone "dname-at-apex-nsec3.example" {
|
||||
type master;
|
||||
file "dname-at-apex-nsec3.example.db";
|
||||
allow-update { any; };
|
||||
auto-dnssec maintain;
|
||||
};
|
||||
|
||||
include "trusted.conf";
|
||||
|
||||
@@ -31,3 +31,5 @@ ns.private A 10.53.0.2
|
||||
insecure NS ns.insecure
|
||||
ns.insecure A 10.53.0.2
|
||||
|
||||
dname-and-txt DNAME @
|
||||
TXT "DNAME and TXT"
|
||||
|
||||
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
|
||||
|
||||
. ./clean.sh
|
||||
|
||||
test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
|
||||
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
|
||||
|
||||
copy_setports ns1/named.conf.in ns1/named.conf
|
||||
copy_setports ns2/named.conf.in ns2/named.conf
|
||||
|
||||
@@ -236,7 +236,7 @@ status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking for nsec3param signing record ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.3 signing -list autonsec3.example. > signing.out.test$n 2>&1 | sed 's/^/ns3 /' | cat_i
|
||||
$RNDCCMD 10.53.0.3 signing -list autonsec3.example. > signing.out.test$n 2>&1
|
||||
grep "Pending NSEC3 chain 1 0 20 DEAF" signing.out.test$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
@@ -1424,5 +1424,23 @@ n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "check that DNAME at apex with NSEC3 is correctly signed (auto-dnssec maintain) ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS txt dname-at-apex-nsec3.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
|
||||
grep "RRSIG NSEC3 7 3 3600" dig.out.ns3.test$n > /dev/null || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "checking that DNAME is not treated as a delegation when signing ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS dname-and-txt.secure.example. DNAME @10.53.0.3 > dig.out.ns3.1.test$n || ret=1
|
||||
grep "dname-and-txt.secure.example.*RRSIG.*DNAME" dig.out.ns3.1.test$n > /dev/null 2>&1 || ret=1
|
||||
$DIG $DIGOPTS dname-and-txt.secure.example. TXT @10.53.0.3 > dig.out.ns3.2.test$n || ret=1
|
||||
grep "dname-and-txt.secure.example.*RRSIG.*TXT" dig.out.ns3.2.test$n > /dev/null 2>&1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DyNaMiC. 300 IN SOA mname1. . 2000042407 20 20 1814400 3600
|
||||
DyNaMiC. 300 IN NS ns1.DYNAMIC.
|
||||
DyNaMiC. 300 IN MX 0 mail.eXaMpLe.
|
||||
DynamiC. 300 IN MX 0 mail.eXaMpLe.
|
||||
mAiL.DynamiC. 300 IN A 10.53.0.1
|
||||
ns1.DYNAMIC. 300 IN A 10.53.0.1
|
||||
DyNaMiC. 300 IN SOA mname1. . 2000042407 20 20 1814400 3600
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
|
||||
; <<>> DiG 9.11.0pre-alpha <<>> axfr dynamic @10.53.0.1 -p 5300
|
||||
;; global options: +cmd
|
||||
dYNAMIc. 0 IN SOA mname1. . 2000042409 20 20 1814400 3600
|
||||
dYNAMIc. 300 IN SOA mname1. . 2000042409 20 20 1814400 3600
|
||||
DyNaMiC. 300 IN NS ns1.DYNAMIC.
|
||||
DyNaMiC. 300 IN MX 0 mail.eXaMpLe.
|
||||
DynamiC. 300 IN MX 0 mail.eXaMpLe.
|
||||
mAiL.DynamiC. 300 IN A 10.53.0.1
|
||||
Ns1.DyNaMIC. 300 IN A 10.53.0.1
|
||||
dYNAMIc. 0 IN SOA mname1. . 2000042409 20 20 1814400 3600
|
||||
;; Query time: 0 msec
|
||||
;; SERVER: 10.53.0.1#5300(10.53.0.1)
|
||||
;; WHEN: Mon Jan 19 14:50:54 EST 2015
|
||||
;; XFR size: 6 records (messages 1, bytes 234)
|
||||
|
||||
dYNAMIc. 300 IN SOA mname1. . 2000042409 20 20 1814400 3600
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dYNAMIc. 300 IN SOA mname1. . 2000042408 20 20 1814400 3600
|
||||
DyNaMiC. 300 IN NS ns1.DYNAMIC.
|
||||
DyNaMiC. 300 IN MX 0 mail.eXaMpLe.
|
||||
DynamiC. 300 IN MX 0 mail.eXaMpLe.
|
||||
mAiL.DynamiC. 300 IN A 10.53.0.1
|
||||
ns1.DYNAMIC. 300 IN A 10.53.0.1
|
||||
dYNAMIc. 300 IN SOA mname1. . 2000042408 20 20 1814400 3600
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
; See the COPYRIGHT file distributed with this work for additional
|
||||
; information regarding copyright ownership.
|
||||
|
||||
@ 86400 SOA ns2.nil. hostmaster.ns2.nil. 0 1 1 1 1
|
||||
@ 86400 NS ns2.nil.
|
||||
@ 86400 SOA ns2.domain0.nil. hostmaster.ns2.nil. 0 1 1 1 1
|
||||
@ 86400 NS ns2.domain0.nil.
|
||||
ns2 86400 A 10.53.0.2
|
||||
ns2 86400 AAAA fd92:7065:b8e:ffff::2
|
||||
|
||||
@ 86400 A 1.2.3.4
|
||||
@ 86400 AAAA 1:2:3::4
|
||||
|
||||
@@ -14,7 +14,7 @@ SYSTEMTESTTOP=..
|
||||
|
||||
$SHELL clean.sh
|
||||
|
||||
test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
|
||||
test -r $RANDFILE || $GENRANDOM $RANDOMSIZE $RANDFILE
|
||||
|
||||
copy_setports ns1/named.conf.in ns1/named.conf
|
||||
copy_setports ns2/named.conf.in ns2/named.conf
|
||||
|
||||
@@ -27,6 +27,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking short DNAME from recursive ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS a.short-dname.example @10.53.0.7 a > dig.out.ns4.short || ret=1
|
||||
grep "status: NOERROR" dig.out.ns4.short > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
@@ -43,6 +44,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking long DNAME from recursive ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS a.long-dname.example @10.53.0.7 a > dig.out.ns4.long || ret=1
|
||||
grep "status: NOERROR" dig.out.ns4.long > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
@@ -59,6 +61,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking (too) long DNAME from recursive with cached DNAME ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.long-dname.example @10.53.0.7 a > dig.out.ns4.cachedtoolong || ret=1
|
||||
grep "status: YXDOMAIN" dig.out.ns4.cachedtoolong > /dev/null || ret=1
|
||||
grep '^long-dname\.example\..*DNAME.*long' dig.out.ns4.cachedtoolong > /dev/null || ret=1
|
||||
@@ -68,6 +71,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking (too) long DNAME from recursive without cached DNAME ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglong.toolong-dname.example @10.53.0.7 a > dig.out.ns4.uncachedtoolong || ret=1
|
||||
grep "status: YXDOMAIN" dig.out.ns4.uncachedtoolong > /dev/null || ret=1
|
||||
grep '^toolong-dname\.example\..*DNAME.*long' dig.out.ns4.uncachedtoolong > /dev/null || ret=1
|
||||
@@ -85,6 +89,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking CNAME to DNAME from recursive"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS cname.example @10.53.0.7 a > dig.out.ns4.cname
|
||||
grep "status: NOERROR" dig.out.ns4.cname > /dev/null || ret=1
|
||||
grep '^cname.example.' dig.out.ns4.cname > /dev/null || ret=1
|
||||
@@ -97,6 +102,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking DNAME is returned with synthesized CNAME before DNAME ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 name.synth-then-dname.example.broken A > dig.out.test$n
|
||||
grep "status: NXDOMAIN" dig.out.test$n > /dev/null || ret=1
|
||||
grep '^name.synth-then-dname\.example\.broken\..*CNAME.*name.$' dig.out.test$n > /dev/null || ret=1
|
||||
@@ -107,6 +113,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking DNAME is returned with CNAME to synthesized CNAME before DNAME ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 cname-to-synth2-then-dname.example.broken A > dig.out.test$n
|
||||
grep "status: NXDOMAIN" dig.out.test$n > /dev/null || ret=1
|
||||
grep '^cname-to-synth2-then-dname\.example\.broken\..*CNAME.*name\.synth2-then-dname\.example\.broken.$' dig.out.test$n > /dev/null || ret=1
|
||||
@@ -118,6 +125,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking CNAME loops are detected ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 loop.example > dig.out.test$n
|
||||
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
|
||||
grep "ANSWER: 17" dig.out.test$n > /dev/null || ret=1
|
||||
@@ -127,6 +135,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking CNAME to external delegated zones is handled ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 a.example > dig.out.test$n
|
||||
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
|
||||
grep "ANSWER: 2" dig.out.test$n > /dev/null || ret=1
|
||||
@@ -136,6 +145,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking CNAME to internal delegated zones is handled ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 b.example > dig.out.test$n
|
||||
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
|
||||
grep "ANSWER: 2" dig.out.test$n > /dev/null || ret=1
|
||||
@@ -145,6 +155,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking CNAME to signed external delgation is handled ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 c.example > dig.out.$n
|
||||
grep "status: NOERROR" dig.out.$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i " failed"; fi
|
||||
@@ -153,6 +164,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking CNAME to signed internal delgation is handled ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 d.example > dig.out.$n
|
||||
grep "status: NOERROR" dig.out.$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i " failed"; fi
|
||||
@@ -161,30 +173,36 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking CNAME chains in various orders ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 1 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "cname,cname,cname|1,2,3,4,s1,s2,s3,s4" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 2' dig.out.1.$n > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 2 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "cname,cname,cname|1,1,2,2,3,4,s4,s3,s1" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 2' dig.out.2.$n > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 3 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "cname,cname,cname|2,1,3,4,s3,s1,s2,s4" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.3.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 2' dig.out.3.$n > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 4 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "cname,cname,cname|4,3,2,1,s4,s3,s2,s1" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.4.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.4.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 2' dig.out.4.$n > /dev/null 2>&1 || ret=1
|
||||
echo "cname,cname,cname|4,3,2,1,s4,s3,s2,s1" | $SEND
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 5 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.5.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.5.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 2' dig.out.5.$n > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 6 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "cname,cname,cname|4,3,3,3,s1,s1,1,3,4" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.6.$n 2>&1
|
||||
@@ -198,6 +216,7 @@ echo_i "checking that only the initial CNAME is cached ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "cname,cname,cname|1,2,3,4,s1,s2,s3,s4" | $SEND
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1
|
||||
sleep 1
|
||||
$DIG $DIGOPTS +noall +answer @10.53.0.7 cname1.domain.nil > dig.out.2.$n 2>&1
|
||||
@@ -209,16 +228,19 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking DNAME chains in various orders ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 1 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "dname,dname|5,4,3,2,1,s5,s4,s3,s2,s1" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 3' dig.out.1.$n > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 2 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "dname,dname|5,4,3,2,1,s5,s4,s3,s2,s1" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 3' dig.out.2.$n > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 3 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "dname,dname|2,3,s1,s2,s3,s4,1" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1
|
||||
@@ -231,15 +253,18 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking external CNAME/DNAME chains in various orders ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 1 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "xname,dname|1,2,3,4,s1,s2,s3,s4" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 2' dig.out.1.$n > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 2 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "xname,dname|s2,2,s1,1,4,s4,3" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1
|
||||
grep 'ANSWER: 2' dig.out.2.$n > /dev/null 2>&1 || ret=1
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n - step 3 --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
echo "xname,dname|s2,2,2,2" | $SEND
|
||||
$DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1
|
||||
@@ -251,6 +276,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking explicit DNAME query ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 dname short-dname.example > dig.out.7.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.7.$n > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
@@ -259,6 +285,7 @@ status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking DNAME via ANY query ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
$DIG $DIGOPTS @10.53.0.7 any short-dname.example > dig.out.7.$n 2>&1
|
||||
grep 'status: NOERROR' dig.out.7.$n > /dev/null 2>&1 || ret=1
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
controls { /* empty */ };
|
||||
options {
|
||||
query-source address 10.53.0.2;
|
||||
notify-source 10.53.0.2;
|
||||
transfer-source 10.53.0.2;
|
||||
port 5300;
|
||||
pid-file "named.pid";
|
||||
listen-on { 10.53.0.2; };
|
||||
listen-on-v6 { none; };
|
||||
heartbeat-interval 2;
|
||||
recursion no;
|
||||
};
|
||||
zone "." {
|
||||
type hint;
|
||||
file "hint";
|
||||
};
|
||||
zone "example." {
|
||||
type stub;
|
||||
dialup notify;
|
||||
notify no;
|
||||
file "example.bk";
|
||||
// masters { 10.53.0.1; };
|
||||
};
|
||||
@@ -36,15 +36,16 @@ done
|
||||
for db in zones/bad*.db
|
||||
do
|
||||
echo_i "checking $db ($n)"
|
||||
ret=0
|
||||
ret=0 v=0
|
||||
case $db in
|
||||
zones/bad-dns-sd-reverse.db)
|
||||
$CHECKZONE -k fail -i local 0.0.0.0.in-addr.arpa $db > test.out.$n 2>&1 && ret=1
|
||||
$CHECKZONE -k fail -i local 0.0.0.0.in-addr.arpa $db > test.out.$n 2>&1 || v=$?
|
||||
;;
|
||||
*)
|
||||
$CHECKZONE -i local example $db > test.out.$n 2>&1 && ret=1
|
||||
$CHECKZONE -i local example $db > test.out.$n 2>&1 || v=$?
|
||||
;;
|
||||
esac
|
||||
test $v = 1 || ret=1
|
||||
n=`expr $n + 1`
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;
|
||||
; See the COPYRIGHT file distributed with this work for additional
|
||||
; information regarding copyright ownership.
|
||||
|
||||
@ 3600 DHCID
|
||||
@ 3600 DHCID
|
||||
@@ -0,0 +1,11 @@
|
||||
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;
|
||||
; See the COPYRIGHT file distributed with this work for additional
|
||||
; information regarding copyright ownership.
|
||||
|
||||
@ EID
|
||||
@ EID
|
||||
@@ -0,0 +1,11 @@
|
||||
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;
|
||||
; See the COPYRIGHT file distributed with this work for additional
|
||||
; information regarding copyright ownership.
|
||||
|
||||
@ 3600 NIMLOC
|
||||
@ 3600 NIMLOC
|
||||
@@ -14,7 +14,7 @@ dyn.example.net. 7200 IN SOA ns1.example.net. hostmaster.example.net. (
|
||||
1209600 ; expire (2 weeks)
|
||||
7200 ; minimum (2 hours)
|
||||
)
|
||||
7200 RRSIG SOA 7 3 7200 2010 20100225214229 30323 dyn.example.net.
|
||||
7200 RRSIG SOA 7 3 7200 2010 20100225214229 30323 dyn.example.net. MuyI
|
||||
7200 NS ns1.example.net.
|
||||
7200 NS ns2.example.net.
|
||||
3600 RRSIG DNSKEY 7 3 3600 20100227180048 (
|
||||
|
||||
@@ -13,9 +13,11 @@
|
||||
# Clean up after a specified system test.
|
||||
#
|
||||
|
||||
SYSTEMTESTTOP=.
|
||||
SYSTEMTESTTOP="$(cd -P -- "$(dirname -- "$0")" && pwd -P)"
|
||||
. $SYSTEMTESTTOP/conf.sh
|
||||
|
||||
export SYSTEMTESTTOP
|
||||
|
||||
# See if the "-r" flag is present. This will usually be set when all the tests
|
||||
# are run (e.g. from "runall.sh") and tells the script not to delete the
|
||||
# test.output file created by run.sh. This is because the script running all
|
||||
|
||||
+44
-10
@@ -15,10 +15,17 @@
|
||||
#
|
||||
|
||||
# Find the top of the BIND9 tree.
|
||||
TOP=${SYSTEMTESTTOP:=.}/../../..
|
||||
TOP=@abs_top_builddir@
|
||||
|
||||
# Make it absolute so that it continues to work after we cd.
|
||||
TOP=`cd $TOP && pwd`
|
||||
# Default algorithm for testing
|
||||
DEFAULT_ALGORITHM=RSASHA256
|
||||
DEFAULT_ALGORITHM_NUMBER=8
|
||||
DEFAULT_BITS=1280
|
||||
|
||||
# must be different from DEFAULT_ALGORITHM
|
||||
ALTERNATIVE_ALGORITHM=RSASHA1
|
||||
ALTERNATIVE_ALGORITHM_NUMBER=5
|
||||
ALTERNATIVE_BITS=1280
|
||||
|
||||
NAMED=$TOP/bin/named/named
|
||||
# We must use "named -l" instead of "lwresd" because argv[0] is lost
|
||||
@@ -73,6 +80,10 @@ SAMPLEUPDATE=$TOP/lib/samples/sample-update
|
||||
# we don't want a KRB5_CONFIG setting breaking the tests
|
||||
KRB5_CONFIG=/dev/null
|
||||
|
||||
# the amount of fake "entropy" to generate with GENRANDOM in
|
||||
# system tests
|
||||
RANDOMSIZE=4096
|
||||
|
||||
# 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
|
||||
@@ -148,6 +159,8 @@ else
|
||||
TESTSOCK6=false
|
||||
fi
|
||||
|
||||
# Windows process management leave empty
|
||||
PSSUSPEND=
|
||||
|
||||
PYTHON=@PYTHON@
|
||||
|
||||
@@ -228,23 +241,36 @@ fi
|
||||
SYSTESTDIR="`basename $PWD`"
|
||||
|
||||
echo_i() {
|
||||
echo "$@" | while read LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$LINE"
|
||||
echo "$@" | while read __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
echo_ic() {
|
||||
echo "$@" | while read LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR: $LINE"
|
||||
echo "$@" | while read __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR: $__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
cat_i() {
|
||||
while read LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$LINE"
|
||||
while read __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
echo_d() {
|
||||
echo "$@" | while read __LINE ; do
|
||||
echoinfo "D:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
cat_d() {
|
||||
while read __LINE ; do
|
||||
echoinfo "D:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
digcomp() {
|
||||
output=`$PERL $SYSTEMTESTTOP/digcomp.pl "$@"`
|
||||
result=$?
|
||||
@@ -320,7 +346,14 @@ copy_setports() {
|
||||
-e "s/@EXTRAPORT6@/${EXTRAPORT6}/g" \
|
||||
-e "s/@EXTRAPORT7@/${EXTRAPORT7}/g" \
|
||||
-e "s/@EXTRAPORT8@/${EXTRAPORT8}/g" \
|
||||
-e "s/@CONTROLPORT@/${CONTROLPORT}/g" $1 > $2
|
||||
-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
|
||||
}
|
||||
|
||||
#
|
||||
@@ -355,6 +388,7 @@ export PIPEQUERIES
|
||||
export PK11DEL
|
||||
export PK11GEN
|
||||
export PK11LIST
|
||||
export PSSUSPEND
|
||||
export PYTHON
|
||||
export RANDFILE
|
||||
export RESOLVE
|
||||
|
||||
@@ -26,6 +26,16 @@ TOP=`cd $TOP && pwd`
|
||||
# Visual Studio build configurations are Release and Debug
|
||||
VSCONF=Debug
|
||||
|
||||
# Default algorithm for testing
|
||||
DEFAULT_ALGORITHM=RSASHA256
|
||||
DEFAULT_ALGORITHM_NUMBER=8
|
||||
DEFAULT_BITS=1280
|
||||
|
||||
# must be different from DEFAULT_ALGORITHM
|
||||
ALTERNATIVE_ALGORITHM=RSASHA1
|
||||
ALTERNATIVE_ALGORITHM_NUMBER=5
|
||||
ALTERNATIVE_BITS=1280
|
||||
|
||||
ARPANAME=$TOP/Build/$VSCONF/arpaname@EXEEXT@
|
||||
CHECKCONF=$TOP/Build/$VSCONF/named-checkconf@EXEEXT@
|
||||
CHECKDS="$PYTHON `cygpath -w $TOP/bin/python/dnssec-checkds.py`"
|
||||
@@ -83,6 +93,10 @@ PIPEQUERIES=$TOP/Build/$VSCONF/pipequeries@EXEEXT@
|
||||
# we don't want a KRB5_CONFIG setting breaking the tests
|
||||
KRB5_CONFIG=NUL
|
||||
|
||||
# the amount of fake "entropy" to generate with GENRANDOM in
|
||||
# system tests
|
||||
RANDOMSIZE=4096
|
||||
|
||||
# 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
|
||||
@@ -90,32 +104,39 @@ KRB5_CONFIG=NUL
|
||||
#
|
||||
# List of tests that use ports 5300 and 9953. For this reason, these must
|
||||
# be run sequentially.
|
||||
SEQUENTIALDIRS="acl additional addzone autosign builtin \
|
||||
cacheclean case \
|
||||
checkconf @CHECKDS@ checknames checkzone cookie @COVERAGE@ \
|
||||
database digdelv dlv dlvauto dlz dlzexternal \
|
||||
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb ecdsa eddsa \
|
||||
ednscompliance emptyzones \
|
||||
fetchlimit filter-aaaa formerr forward geoip glue gost idna inline ixfr \
|
||||
@KEYMGR@ legacy limits logfileconfig lwresd masterfile masterformat \
|
||||
metadata mkeys names notify nslookup nsupdate nzd2nzf pending \
|
||||
@PKCS11_TEST@ pipelined reclimit redirect resolver rndc rpz \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime sfcache \
|
||||
smartsign sortlist spf staticstub statistics statschannel stub tcp \
|
||||
tkey tsig tsiggss unknown upforwd verify views wildcard xfer \
|
||||
xferquota zero zonechecks"
|
||||
SEQUENTIALDIRS="ecdsa eddsa gost lwresd @PKCS11_TEST@ tkey"
|
||||
|
||||
# List of tests that use unique ports (other than 5300 and 9953). These
|
||||
# tests can be run in parallel.
|
||||
#
|
||||
# This symbol must be kept in step with the PARALLEL macro in Makefile.in
|
||||
PARALLELDIRS="allow_query catz rpzrecurse"
|
||||
# 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 autosign \
|
||||
builtin cacheclean case catz 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 \
|
||||
legacy limits lwresd masterfile masterformat metadata mkeys \
|
||||
names notify nslookup nsupdate nzd2nzf \
|
||||
pending pipelined \
|
||||
reclimit redirect resolver rndc rootkeysentinel rpz rpzrecurse \
|
||||
rrchecker rrl rrsetorder rsabigexponent runtime \
|
||||
sfcache smartsign sortlist \
|
||||
spf staticstub statistics statschannel stub \
|
||||
tcp tools tsig tsiggss \
|
||||
unknown upforwd verify views wildcard \
|
||||
xfer xferquota zero zonechecks"
|
||||
|
||||
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
|
||||
|
||||
# missing: chain integrity
|
||||
# extra: dname ednscompliance forward
|
||||
|
||||
#Things that are different on Windows
|
||||
KILL="/bin/kill -f"
|
||||
DIFF="diff --strip-trailing-cr"
|
||||
@@ -148,7 +169,11 @@ else
|
||||
TESTSOCK6=false
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# PsSuspend is part of PSTools and can be downloaded from
|
||||
# https://download.sysinternals.com/files/PSTools.zip
|
||||
#
|
||||
PSSUSPEND=@PSSUSPEND@
|
||||
PYTHON=@PYTHON@
|
||||
|
||||
#
|
||||
@@ -203,17 +228,23 @@ echoend () {
|
||||
printf "${COLOR_END}%s${COLOR_NONE}\n" "$*"
|
||||
}
|
||||
|
||||
TESTNAME="`basename $PWD`"
|
||||
SYSTESTDIR="`basename $PWD`"
|
||||
|
||||
echo_i() {
|
||||
echo "$@" | while read LINE ; do
|
||||
echoinfo "I:$TESTNAME:$LINE"
|
||||
echo "$@" | while read __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
echo_ic() {
|
||||
echo "$@" | while read __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR: $__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
cat_i() {
|
||||
while read LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$LINE"
|
||||
while read __LINE ; do
|
||||
echoinfo "I:$SYSTESTDIR:$__LINE"
|
||||
done
|
||||
}
|
||||
|
||||
@@ -298,7 +329,14 @@ copy_setports() {
|
||||
-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" $1 > $2
|
||||
-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
|
||||
}
|
||||
|
||||
#
|
||||
@@ -333,6 +371,7 @@ export PIPEQUERIES
|
||||
export PK11DEL
|
||||
export PK11GEN
|
||||
export PK11LIST
|
||||
export PSSUSPEND
|
||||
export PYTHON
|
||||
export RANDFILE
|
||||
export RESOLVE
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
;
|
||||
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;
|
||||
; See the COPYRIGHT file distributed with this work for additional
|
||||
; information regarding copyright ownership.
|
||||
|
||||
@ 3600 SOA . . 0 0 0 0 0
|
||||
@ 3600 NS .
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
key rndc_key {
|
||||
secret "1234abcd8765";
|
||||
algorithm hmac-sha256;
|
||||
};
|
||||
|
||||
controls {
|
||||
inet 10.53.0.8 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
|
||||
};
|
||||
|
||||
options {
|
||||
query-source address 10.53.0.8;
|
||||
notify-source 10.53.0.8;
|
||||
transfer-source 10.53.0.8;
|
||||
port @PORT@;
|
||||
pid-file "named.pid";
|
||||
listen-on { 10.53.0.8; };
|
||||
listen-on-v6 { none; };
|
||||
dnssec-validation yes;
|
||||
rate-limit {};
|
||||
require-server-cookie yes;
|
||||
};
|
||||
|
||||
zone "example" {
|
||||
type master;
|
||||
file "example.db";
|
||||
};
|
||||
@@ -20,3 +20,4 @@ copy_setports ns4/named.conf.in ns4/named.conf
|
||||
copy_setports ns5/named.conf.in ns5/named.conf
|
||||
copy_setports ns6/named.conf.in ns6/named.conf
|
||||
copy_setports ns7/named.conf.in ns7/named.conf
|
||||
copy_setports ns8/named.conf.in ns8/named.conf
|
||||
|
||||
@@ -21,7 +21,7 @@ n=0
|
||||
getcookie() {
|
||||
awk '$2 == "COOKIE:" {
|
||||
print $3;
|
||||
}' < $1
|
||||
}' < $1 | tr -d '\r'
|
||||
}
|
||||
|
||||
fullcookie() {
|
||||
@@ -37,21 +37,21 @@ havetc() {
|
||||
for bad in bad*.conf
|
||||
do
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf detects error in $bad ($n)"
|
||||
ret=0
|
||||
$CHECKCONF $bad > /dev/null 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
echo_i "checking that named-checkconf detects error in $bad ($n)"
|
||||
ret=0
|
||||
$CHECKCONF $bad > /dev/null 2>&1 && ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
done
|
||||
|
||||
for good in good*.conf
|
||||
do
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking that named-checkconf detects accepts $good ($n)"
|
||||
ret=0
|
||||
$CHECKCONF $good > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
echo_i "checking that named-checkconf detects accepts $good ($n)"
|
||||
ret=0
|
||||
$CHECKCONF $good > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
done
|
||||
|
||||
n=`expr $n + 1`
|
||||
@@ -142,8 +142,12 @@ n=`expr $n + 1`
|
||||
echo_i "checking for COOKIE value in adb ($n)"
|
||||
ret=0
|
||||
$RNDCCMD 10.53.0.1 dumpdb
|
||||
sleep 1
|
||||
grep "10.53.0.2.*\[cookie=" ns1/named_dump.db > /dev/null|| ret=1
|
||||
for i in 1 2 3 4 5 6 7 8 9 10
|
||||
do
|
||||
sleep 1
|
||||
grep "10.53.0.2.*\[cookie=" ns1/named_dump.db > /dev/null && break
|
||||
done
|
||||
grep "10.53.0.2.*\[cookie=" ns1/named_dump.db > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -169,6 +173,41 @@ if [ $linecount != 2 ]; then ret=1; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking require-server-cookie yes with rate-limit ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS +qr +cookie +nobadcookie soa example @10.53.0.8 > dig.out.test$n
|
||||
grep "flags: qr[^;]* ad[ ;]" dig.out.test$n > /dev/null && ret=1
|
||||
grep BADCOOKIE dig.out.test$n > /dev/null || ret=1
|
||||
linecount=`getcookie dig.out.test$n | wc -l`
|
||||
if [ $linecount != 2 ]; then ret=1; fi
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "send undersized cookie ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS +qr +cookie=000000 soa @10.53.0.1 > dig.out.test$n || ret=1
|
||||
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "send oversized for named cookie ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS +qr +cookie=${cookie}00 soa @10.53.0.1 > dig.out.test$n || ret=1
|
||||
grep "COOKIE: [a-f0-9]* (good)" dig.out.test$n > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "send oversized for named cookie with server requiring a good cookie ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS +qr +cookie=${cookie}00 soa @10.53.0.3 > dig.out.test$n || ret=1
|
||||
grep "COOKIE: [a-f0-9]* (good)" dig.out.test$n > /dev/null 2>&1 || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
#
|
||||
# Test shared cookie-secret support.
|
||||
#
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
args=
|
||||
warn=4
|
||||
error=1
|
||||
ok=1
|
||||
retcode=1
|
||||
match=0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user