Compare commits
649
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50d3b45641 | ||
|
|
894896a42b | ||
|
|
8497465fc7 | ||
|
|
914e8ddd61 | ||
|
|
bc7b34d6ef | ||
|
|
f13c87b89a | ||
|
|
6c478a3dae | ||
|
|
8c30864374 | ||
|
|
a27b9dff18 | ||
|
|
a61bf39688 | ||
|
|
1c8c1815e4 | ||
|
|
a1dbec3b08 | ||
|
|
1fe432c6c3 | ||
|
|
e0b5dd67a1 | ||
|
|
de1948398d | ||
|
|
7dd329d385 | ||
|
|
41a67147fe | ||
|
|
75b26d3f50 | ||
|
|
9893bd3246 | ||
|
|
4a82749461 | ||
|
|
b49310ac06 | ||
|
|
a97a63ad51 | ||
|
|
fe9ef0d9f5 | ||
|
|
3d5826b75b | ||
|
|
cfa2804e5a | ||
|
|
bbb0947ee1 | ||
|
|
5d37c910c8 | ||
|
|
7d6b8f7c12 | ||
|
|
7665e13206 | ||
|
|
1c97ace7dc | ||
|
|
c13879a6fb | ||
|
|
03ab07c9c0 | ||
|
|
33bca30a55 | ||
|
|
27f3a210d7 | ||
|
|
adcc16f2d7 | ||
|
|
42de310291 | ||
|
|
2be55f5c05 | ||
|
|
02497cf6d3 | ||
|
|
dadb924be7 | ||
|
|
f056d04eed | ||
|
|
4500d9e91a | ||
|
|
ac01359871 | ||
|
|
47346110b1 | ||
|
|
7122b5786d | ||
|
|
3175ea9a87 | ||
|
|
6a3b851f72 | ||
|
|
2d68f606cf | ||
|
|
fd050b6baf | ||
|
|
246ac08770 | ||
|
|
4b5337e06b | ||
|
|
482dd7eed3 | ||
|
|
3b1a914395 | ||
|
|
82e83d5dc7 | ||
|
|
5da2d171df | ||
|
|
66be4108bf | ||
|
|
61f5306226 | ||
|
|
bd529b1f30 | ||
|
|
67fbbc4e0c | ||
|
|
01b75a9b5b | ||
|
|
189b8b76d4 | ||
|
|
e2cdf066ea | ||
|
|
f8965a5588 | ||
|
|
4c7e6e0799 | ||
|
|
f9d9c5686d | ||
|
|
9dd39d5385 | ||
|
|
ca977e3976 | ||
|
|
43bfd4cccc | ||
|
|
ee23780246 | ||
|
|
287bb7b482 | ||
|
|
5e8b772ad1 | ||
|
|
5114270fa7 | ||
|
|
3328116b57 | ||
|
|
604889e627 | ||
|
|
8e6af477dd | ||
|
|
188c184381 | ||
|
|
0c42a9c0ab | ||
|
|
c6ac1b092d | ||
|
|
8a8d378def | ||
|
|
10d8f3194f | ||
|
|
24961f6068 | ||
|
|
1b409b8cfc | ||
|
|
3242cb53ec | ||
|
|
13975b32c6 | ||
|
|
c108fc5c6e | ||
|
|
ef1da8731b | ||
|
|
dca1652458 | ||
|
|
1df9ca9e6a | ||
|
|
33350626f9 | ||
|
|
a38b31ccf9 | ||
|
|
bb57c7f775 | ||
|
|
402190df18 | ||
|
|
3485fe4b86 | ||
|
|
5cdc63254b | ||
|
|
792692f86d | ||
|
|
32edbd7859 | ||
|
|
971c01ad19 | ||
|
|
c69ad95238 | ||
|
|
18e393bd90 | ||
|
|
dc64b70616 | ||
|
|
3a754d4bf8 | ||
|
|
4af0d9145a | ||
|
|
1b95cb79bb | ||
|
|
5ea712d964 | ||
|
|
8f02762b81 | ||
|
|
5b63b595fc | ||
|
|
285d5b125b | ||
|
|
5b29b6889b | ||
|
|
6d577430ce | ||
|
|
83903f6f5e | ||
|
|
4075347c47 | ||
|
|
b75970efa3 | ||
|
|
314a25e4d4 | ||
|
|
1a4559030e | ||
|
|
301f2fbedc | ||
|
|
ff7c868f25 | ||
|
|
1a93e5bd3e | ||
|
|
272c065268 | ||
|
|
191b12e304 | ||
|
|
a7de66142c | ||
|
|
17cdde1e56 | ||
|
|
cefc3706a0 | ||
|
|
5ca649967e | ||
|
|
34c0948aa7 | ||
|
|
6afa8a77d3 | ||
|
|
1dd11fc754 | ||
|
|
6d976b37c1 | ||
|
|
b04842c057 | ||
|
|
8903d68d69 | ||
|
|
37c2d69547 | ||
|
|
6e12939d63 | ||
|
|
6d50138405 | ||
|
|
517449e0e6 | ||
|
|
35d495db68 | ||
|
|
cad6b39cab | ||
|
|
e1ce3a3d42 | ||
|
|
16d486ec59 | ||
|
|
99cf0faec0 | ||
|
|
3951cb053b | ||
|
|
41478d0af6 | ||
|
|
b6538b5488 | ||
|
|
d77ac39370 | ||
|
|
fee890461b | ||
|
|
6ea19e66c3 | ||
|
|
808dac0760 | ||
|
|
8b10b07d20 | ||
|
|
cc0a3c5d3c | ||
|
|
39f6d33002 | ||
|
|
b269c7e4a0 | ||
|
|
de13354caf | ||
|
|
90f1446253 | ||
|
|
7a721f983e | ||
|
|
4af9f97189 | ||
|
|
2ec746dafe | ||
|
|
9fc68285ef | ||
|
|
bdbf6ede3a | ||
|
|
ba1b9ca4d4 | ||
|
|
18e8835044 | ||
|
|
0289f3f281 | ||
|
|
53a33f7365 | ||
|
|
17ce0b373f | ||
|
|
85da986d68 | ||
|
|
f2f7711977 | ||
|
|
7e4b82103b | ||
|
|
f4ceb12b69 | ||
|
|
d78d405d1a | ||
|
|
fed3e7a815 | ||
|
|
2da3caf339 | ||
|
|
730015f33e | ||
|
|
87b3b46096 | ||
|
|
a5678ed78f | ||
|
|
e20d5e4dd2 | ||
|
|
bb60797799 | ||
|
|
6e53bb4e09 | ||
|
|
a32d2360f7 | ||
|
|
d844959a44 | ||
|
|
47a4e0eeaa | ||
|
|
ff20b8040d | ||
|
|
0ef2853c0d | ||
|
|
abe39991be | ||
|
|
5cc06e475a | ||
|
|
826c335980 | ||
|
|
a2e38f758d | ||
|
|
e69dc0dbc7 | ||
|
|
74f895740c | ||
|
|
bc12c52e82 | ||
|
|
351efd8812 | ||
|
|
7ff7de0609 | ||
|
|
f5785f97fc | ||
|
|
e71bbde57d | ||
|
|
e1bf5624fb | ||
|
|
f566010717 | ||
|
|
7e07d05ae7 | ||
|
|
211d83b0cd | ||
|
|
aeebcb4ae8 | ||
|
|
ca7cadfa92 | ||
|
|
a160fecaa1 | ||
|
|
c0eb02d435 | ||
|
|
3bca52ca07 | ||
|
|
e5da71f746 | ||
|
|
adbca54079 | ||
|
|
6b470bbf42 | ||
|
|
06e218c421 | ||
|
|
4ccff3bbed | ||
|
|
b108376a10 | ||
|
|
8b17f364a9 | ||
|
|
c6527aedc7 | ||
|
|
882ad18c5e | ||
|
|
5bd855251c | ||
|
|
cbde34e7a3 | ||
|
|
ab7356a7de | ||
|
|
90b773134c | ||
|
|
b2aca96c27 | ||
|
|
388bfdb945 | ||
|
|
c8e92d3e45 | ||
|
|
9eec02a81f | ||
|
|
0c0536a1e4 | ||
|
|
115736b3f5 | ||
|
|
5e2cd91321 | ||
|
|
9586c3a696 | ||
|
|
665618698e | ||
|
|
71e54bfe0f | ||
|
|
fa666f5d88 | ||
|
|
0e12988dd6 | ||
|
|
f70a84537d | ||
|
|
c63ead9d96 | ||
|
|
4234968798 | ||
|
|
fd20f10d52 | ||
|
|
8da0c0e7d5 | ||
|
|
7a47e4d85f | ||
|
|
b94945e606 | ||
|
|
9df0bdc99c | ||
|
|
baa38d6e94 | ||
|
|
0b988256c7 | ||
|
|
74683fbc3b | ||
|
|
8725f57371 | ||
|
|
427e9ca357 | ||
|
|
055bf2665c | ||
|
|
81f58e2ea2 | ||
|
|
9911c835d3 | ||
|
|
d2f4644388 | ||
|
|
e2ac439e28 | ||
|
|
d3f0f71b6b | ||
|
|
e4f0a98b4d | ||
|
|
0d7ab9bafc | ||
|
|
d43dcef139 | ||
|
|
29897b14dc | ||
|
|
70cc3f803e | ||
|
|
6f11f90ef4 | ||
|
|
0737079824 | ||
|
|
7ef858f503 | ||
|
|
1cf2f7d077 | ||
|
|
6a5c8ec2ea | ||
|
|
d0ba302028 | ||
|
|
953a957dfa | ||
|
|
8537adef4c | ||
|
|
43be6ff428 | ||
|
|
ddc1d4d6d4 | ||
|
|
258ea3a8f4 | ||
|
|
00cc0b236a | ||
|
|
b13c7ca402 | ||
|
|
cbcf6dacb6 | ||
|
|
835bad2c5c | ||
|
|
8743a853d2 | ||
|
|
ef87b1e60b | ||
|
|
69dee61f5a | ||
|
|
88d3338f5f | ||
|
|
c644c0f283 | ||
|
|
9532e3256e | ||
|
|
a48ca15e77 | ||
|
|
998e3e2880 | ||
|
|
e227815af5 | ||
|
|
27ee629e6b | ||
|
|
16b95157e8 | ||
|
|
0fc8bfef13 | ||
|
|
597049461d | ||
|
|
828d7121e0 | ||
|
|
253c175d7b | ||
|
|
f454d9825c | ||
|
|
b2c4c35493 | ||
|
|
1b2a3a0ea6 | ||
|
|
7c60b78080 | ||
|
|
5744415a75 | ||
|
|
409ac247f7 | ||
|
|
e6c5ad37a4 | ||
|
|
16eb35187a | ||
|
|
b78376ffc9 | ||
|
|
d13cabd27e | ||
|
|
77032a4e29 | ||
|
|
73bc3147d1 | ||
|
|
66fc2f7fec | ||
|
|
b29f0c1d05 | ||
|
|
a487473fc5 | ||
|
|
b726ca4533 | ||
|
|
02d20a2f53 | ||
|
|
6499bdfd8b | ||
|
|
0ac2a868bb | ||
|
|
6ab40c043d | ||
|
|
b99af25d0f | ||
|
|
53bdf8038c | ||
|
|
0708e43d3f | ||
|
|
e8d7292d5d | ||
|
|
b94293f591 | ||
|
|
d75602406e | ||
|
|
2ecd280297 | ||
|
|
da9038e9a0 | ||
|
|
c5b8bc0e15 | ||
|
|
a688a43faf | ||
|
|
bf519a3574 | ||
|
|
62ca7743ae | ||
|
|
7e4ed9f8ad | ||
|
|
e24afa3088 | ||
|
|
ad0b4e9d41 | ||
|
|
d5793ecca2 | ||
|
|
54b4e4e61c | ||
|
|
6363652d51 | ||
|
|
4f075d869c | ||
|
|
509dad8737 | ||
|
|
1634592c99 | ||
|
|
6696a40ea9 | ||
|
|
2eabc74547 | ||
|
|
2156a5b610 | ||
|
|
e9d999f6b0 | ||
|
|
33132406a3 | ||
|
|
9cf529fa50 | ||
|
|
29fb4faf76 | ||
|
|
d0f0298f38 | ||
|
|
d1a8a3faed | ||
|
|
2fa857d502 | ||
|
|
3987a146be | ||
|
|
0667fa935a | ||
|
|
f6c4ed94e4 | ||
|
|
259a4947e6 | ||
|
|
2271e77d99 | ||
|
|
21db43da8e | ||
|
|
e3c8a23276 | ||
|
|
929ea7c2c4 | ||
|
|
d940e95206 | ||
|
|
b7a15a5da0 | ||
|
|
2f3eee5a4f | ||
|
|
73a8999d1c | ||
|
|
0bed9bfc28 | ||
|
|
ac4f8a51cc | ||
|
|
db1cd0d970 | ||
|
|
976881f4be | ||
|
|
5c9c53e9e7 | ||
|
|
9145bec00d | ||
|
|
6b65a4f86e | ||
|
|
9c4c1320e2 | ||
|
|
9a4aa2aa5a | ||
|
|
380ab3b39f | ||
|
|
5f81aa10bc | ||
|
|
4f7177c794 | ||
|
|
a8649cc299 | ||
|
|
5bc8feab45 | ||
|
|
d00b3f47ba | ||
|
|
0e555d7e01 | ||
|
|
175f06949f | ||
|
|
aa4ac49bb8 | ||
|
|
7a3eb391fa | ||
|
|
6f09738cef | ||
|
|
ccfd577715 | ||
|
|
867180e462 | ||
|
|
4979d5f31f | ||
|
|
39ebebaaf7 | ||
|
|
e75e206a3d | ||
|
|
4e5ac64aca | ||
|
|
8f15219f36 | ||
|
|
d4bad35bb0 | ||
|
|
dfa1589975 | ||
|
|
827d7f0e49 | ||
|
|
14fa99e3b4 | ||
|
|
1276cf4cd1 | ||
|
|
6cfb2249e1 | ||
|
|
7346199a92 | ||
|
|
bad342adab | ||
|
|
1ca5920113 | ||
|
|
474fbe88bf | ||
|
|
f5d8bd0853 | ||
|
|
c2a274cc5d | ||
|
|
de0290821a | ||
|
|
37ff7f635b | ||
|
|
65c084e4eb | ||
|
|
8de2451756 | ||
|
|
436b6fb354 | ||
|
|
9b0501635b | ||
|
|
fa33b4ee23 | ||
|
|
ed4a49122b | ||
|
|
de219b8555 | ||
|
|
e31e5732fd | ||
|
|
18781c5a3d | ||
|
|
9f35a59f71 | ||
|
|
79afbe2966 | ||
|
|
16d329d55b | ||
|
|
6be7b631ab | ||
|
|
1f0cd6606e | ||
|
|
59ac0e87f8 | ||
|
|
e55bbec66e | ||
|
|
3f7d79e574 | ||
|
|
ca7b5ceee5 | ||
|
|
d960210114 | ||
|
|
c1a4f0e66a | ||
|
|
559ce1e330 | ||
|
|
b2b210d6d9 | ||
|
|
d652551e86 | ||
|
|
88edf8fe4d | ||
|
|
7223790380 | ||
|
|
9c926a5d9b | ||
|
|
58d75d9d8d | ||
|
|
f94f4bc1f4 | ||
|
|
bd024eee57 | ||
|
|
89b1817211 | ||
|
|
6feb688f69 | ||
|
|
cbc1b12311 | ||
|
|
778ab8158a | ||
|
|
59171fe359 | ||
|
|
32503f3b52 | ||
|
|
a2013231a3 | ||
|
|
8c4d50c6bc | ||
|
|
efe3c038b1 | ||
|
|
d534ae5c12 | ||
|
|
336d5a5374 | ||
|
|
92a3762cb6 | ||
|
|
2c7e6947fa | ||
|
|
eda6281f98 | ||
|
|
b915cdbf0b | ||
|
|
2837a821e8 | ||
|
|
dfd90dbb82 | ||
|
|
1b48e710d5 | ||
|
|
4ba08bb119 | ||
|
|
e38901154d | ||
|
|
9a464ef869 | ||
|
|
98d5abb73c | ||
|
|
ad923f82b1 | ||
|
|
005e19ad3f | ||
|
|
8d347788b0 | ||
|
|
01a193ff6c | ||
|
|
0a4f6122de | ||
|
|
bb5ed5a4ac | ||
|
|
55465517c7 | ||
|
|
9f83d31e42 | ||
|
|
06b4ff5fe2 | ||
|
|
015fda0bb4 | ||
|
|
28121c248e | ||
|
|
79cd093cd7 | ||
|
|
6dfc868fba | ||
|
|
db5eece106 | ||
|
|
cca16eccd7 | ||
|
|
a33bca5d55 | ||
|
|
dcf65c82ad | ||
|
|
9eea00cd3c | ||
|
|
bd009b34a6 | ||
|
|
6ad7acd787 | ||
|
|
683094e308 | ||
|
|
20cef35ece | ||
|
|
3e52987229 | ||
|
|
72f60bdd84 | ||
|
|
c701f036ea | ||
|
|
3bf9a1e567 | ||
|
|
c9ff174dce | ||
|
|
4f84acb788 | ||
|
|
231436039d | ||
|
|
7ab8c5b583 | ||
|
|
5f377136be | ||
|
|
b3db0266cb | ||
|
|
8161be27db | ||
|
|
4133fd86f1 | ||
|
|
049a3a7c0e | ||
|
|
c1c8d8846f | ||
|
|
718ca3166c | ||
|
|
cc6ab2416b | ||
|
|
a7c308df9c | ||
|
|
52b86f0abe | ||
|
|
02a5db7631 | ||
|
|
dc88db015b | ||
|
|
79ac715763 | ||
|
|
48dc2831d7 | ||
|
|
318b340f5e | ||
|
|
cec8c52cbe | ||
|
|
7ec945bd41 | ||
|
|
d8766293ab | ||
|
|
b434b0a4b6 | ||
|
|
2afd18a2ce | ||
|
|
f456e64736 | ||
|
|
c38b145b89 | ||
|
|
1473ddcc65 | ||
|
|
a5524b5fe2 | ||
|
|
fdb74fed9e | ||
|
|
995bafbd72 | ||
|
|
de6f43d071 | ||
|
|
5e44a1008f | ||
|
|
82b23ecc5e | ||
|
|
4eadebe2b2 | ||
|
|
93776c4c81 | ||
|
|
652ce14e7f | ||
|
|
2639030d66 | ||
|
|
9c8fead6d8 | ||
|
|
13e53ef38a | ||
|
|
50714a9b35 | ||
|
|
a91bf68d66 | ||
|
|
333f718dd3 | ||
|
|
c59f332db2 | ||
|
|
261230343a | ||
|
|
11db6dd8ff | ||
|
|
3f95f4ffbb | ||
|
|
cf9c2ef305 | ||
|
|
f6ca532df4 | ||
|
|
02b828e63f | ||
|
|
54fdd6e834 | ||
|
|
e9a939841d | ||
|
|
ac2ea36fa5 | ||
|
|
590d391bbb | ||
|
|
aa2c4bfdc0 | ||
|
|
e356d93175 | ||
|
|
77128c867c | ||
|
|
f6f07fb41e | ||
|
|
ba5d28dcfe | ||
|
|
75fa84b67b | ||
|
|
1003ef4d67 | ||
|
|
9e1af0cef1 | ||
|
|
129e5306d0 | ||
|
|
867bc3399b | ||
|
|
18758392da | ||
|
|
0507658884 | ||
|
|
ae40e8039b | ||
|
|
4621756596 | ||
|
|
75cc4156e9 | ||
|
|
9671909289 | ||
|
|
582e261290 | ||
|
|
cd0d61e0c8 | ||
|
|
b2dbe37538 | ||
|
|
9024cf0c15 | ||
|
|
ba0e5ffc09 | ||
|
|
9a59352b4c | ||
|
|
cc60f3a3be | ||
|
|
a1de63a2d2 | ||
|
|
d99788042d | ||
|
|
62a92b7784 | ||
|
|
5e3f20a71b | ||
|
|
7a7cf952ad | ||
|
|
471110933a | ||
|
|
4f04a79250 | ||
|
|
3f0aaf7a60 | ||
|
|
baa46c3d4b | ||
|
|
65ffafdc6a | ||
|
|
4f7deb348b | ||
|
|
6ead8c7be8 | ||
|
|
6bac3508ec | ||
|
|
505a1ceda4 | ||
|
|
28442f11f0 | ||
|
|
a13a0a2beb | ||
|
|
896fb585b3 | ||
|
|
02be459f37 | ||
|
|
6f5fe11f5a | ||
|
|
c355e1f38f | ||
|
|
2a652aefe9 | ||
|
|
f95e4593ed | ||
|
|
c303cf5cc9 | ||
|
|
68ca987792 | ||
|
|
23fff6c569 | ||
|
|
b992b5b811 | ||
|
|
29c45200e7 | ||
|
|
4eaf927571 | ||
|
|
e2e138a801 | ||
|
|
a831e0f72d | ||
|
|
461ffead1f | ||
|
|
b2b43fd235 | ||
|
|
fbd2e47f51 | ||
|
|
8e292b3262 | ||
|
|
82dfb77328 | ||
|
|
0949b1fe2c | ||
|
|
dbf2e7928e | ||
|
|
3317d3d2bb | ||
|
|
601abfab30 | ||
|
|
b1e1dd2c25 | ||
|
|
54ff27a6bc | ||
|
|
cd6c016896 | ||
|
|
ce478b4fc9 | ||
|
|
7a2248acf9 | ||
|
|
e9bf8e4798 | ||
|
|
319c166a50 | ||
|
|
b673f509d2 | ||
|
|
9a903789ed | ||
|
|
460c8038c1 | ||
|
|
b3827319e0 | ||
|
|
f166cabcae | ||
|
|
025c74adee | ||
|
|
8fb5bc783f | ||
|
|
152c437bb8 | ||
|
|
913856911a | ||
|
|
17d46fd48b | ||
|
|
c80e25e482 | ||
|
|
64020dd7bc | ||
|
|
669a694d3b | ||
|
|
c416389d32 | ||
|
|
818d63a3a1 | ||
|
|
d7be8afea5 | ||
|
|
81a85070c5 | ||
|
|
7b6721b27f | ||
|
|
151b64aa3e | ||
|
|
6298061e24 | ||
|
|
1b1d63acd8 | ||
|
|
95e84464b7 | ||
|
|
9c0c44405c | ||
|
|
2a11a7dd29 | ||
|
|
b659765869 | ||
|
|
7697923eab | ||
|
|
e8c57a78aa | ||
|
|
0e1bf7d017 | ||
|
|
46dbf96bd9 | ||
|
|
bf8746126c | ||
|
|
2bef7291be | ||
|
|
00f377da93 | ||
|
|
3064d3d0ef | ||
|
|
ae0160c33b | ||
|
|
a868f335d2 | ||
|
|
164370102a | ||
|
|
d6f6eeda9d | ||
|
|
56603265ee | ||
|
|
99b25eb379 | ||
|
|
ce5ac790bb | ||
|
|
b2f8f37b80 | ||
|
|
ae5c86ba9a | ||
|
|
2d0a33208c | ||
|
|
d88efa7e40 | ||
|
|
fc99651d7d | ||
|
|
9e61693210 | ||
|
|
9163e93b9e | ||
|
|
b4baa3e751 | ||
|
|
c94bd140e3 | ||
|
|
f09c3a1189 | ||
|
|
97bb9b2be9 | ||
|
|
27cfe83a38 | ||
|
|
893ab37ce7 | ||
|
|
3290daa939 | ||
|
|
0e979358ee | ||
|
|
0e356d6a4a | ||
|
|
54b9690a4e | ||
|
|
76ec6861e5 | ||
|
|
428daba5ce | ||
|
|
07eebc42e4 | ||
|
|
3b6f9db3fb | ||
|
|
280d0ca507 | ||
|
|
5794c78159 | ||
|
|
67f824434f | ||
|
|
ce47ca8c6b | ||
|
|
05bf7e4e3e | ||
|
|
b27630a130 | ||
|
|
1ac7058a0f | ||
|
|
a0de6707c0 |
@@ -0,0 +1,64 @@
|
||||
;;; Directory Local Variables
|
||||
;;; For more information see (info "(emacs) Directory Variables")
|
||||
|
||||
((c-mode .
|
||||
((eval .
|
||||
(set (make-local-variable 'directory-of-current-dir-locals-file)
|
||||
(file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
|
||||
)
|
||||
)
|
||||
(eval .
|
||||
(set (make-local-variable 'include-directories)
|
||||
(list
|
||||
|
||||
;; top directory
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "./"))
|
||||
|
||||
;; current directory
|
||||
(expand-file-name (concat default-directory "./"))
|
||||
|
||||
;; libisc
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/include"))
|
||||
|
||||
;; libdns
|
||||
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/dns/include"))
|
||||
|
||||
;; libisccc
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isccc/include"))
|
||||
|
||||
;; libisccfg
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isccfg/include"))
|
||||
|
||||
;; libns
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/ns/include"))
|
||||
|
||||
;; libirs
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/irs/include"))
|
||||
|
||||
;; libbind9
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
|
||||
|
||||
(expand-file-name "/usr/local/opt/openssl@1.1/include")
|
||||
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
|
||||
(expand-file-name "/usr/local/include")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(eval setq flycheck-clang-include-path include-directories)
|
||||
(eval setq flycheck-cppcheck-include-path include-directories)
|
||||
)
|
||||
))
|
||||
-29
@@ -27,35 +27,6 @@ gen.dSYM/
|
||||
.deps/
|
||||
.dirstamp
|
||||
.libs/
|
||||
unit/atf-src/atf-c++/atf-c++.pc
|
||||
unit/atf-src/atf-c/atf-c.pc
|
||||
unit/atf-src/atf-c/defs.h
|
||||
unit/atf-src/atf-c/detail/process_helpers
|
||||
unit/atf-src/atf-config/atf-config
|
||||
unit/atf-src/atf-report/atf-report
|
||||
unit/atf-src/atf-report/fail_helper
|
||||
unit/atf-src/atf-report/misc_helpers
|
||||
unit/atf-src/atf-report/pass_helper
|
||||
unit/atf-src/atf-run/atf-run
|
||||
unit/atf-src/atf-run/bad_metadata_helper
|
||||
unit/atf-src/atf-run/expect_helpers
|
||||
unit/atf-src/atf-run/misc_helpers
|
||||
unit/atf-src/atf-run/pass_helper
|
||||
unit/atf-src/atf-run/several_tcs_helper
|
||||
unit/atf-src/atf-run/zero_tcs_helper
|
||||
unit/atf-src/atf-sh/atf-check
|
||||
unit/atf-src/atf-sh/atf-sh
|
||||
unit/atf-src/atf-sh/misc_helpers
|
||||
unit/atf-src/atf-version/atf-version
|
||||
unit/atf-src/atf-version/revision.h
|
||||
unit/atf-src/atf-version/revision.h.stamp
|
||||
unit/atf-src/bconfig.h
|
||||
unit/atf-src/bootstrap/atconfig
|
||||
unit/atf-src/doc/atf.7
|
||||
unit/atf-src/stamp-h1
|
||||
unit/atf-src/test-programs/c_helpers
|
||||
unit/atf-src/test-programs/cpp_helpers
|
||||
unit/atf-src/test-programs/sh_helpers
|
||||
# ccc-analyzer store its results in .plist directories
|
||||
*.plist/
|
||||
*~
|
||||
|
||||
+319
-238
@@ -1,7 +1,9 @@
|
||||
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: registry.gitlab.isc.org/isc-projects/images/bind9
|
||||
CCACHE_DIR: "/ccache"
|
||||
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
|
||||
@@ -12,129 +14,104 @@ stages:
|
||||
- test
|
||||
- push
|
||||
|
||||
.centos-centos6-amd64: ¢os_centos6_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
|
||||
### Runner Tag Templates
|
||||
|
||||
.linux-amd64: &linux_amd64
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- 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"
|
||||
<<: *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
|
||||
|
||||
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
# 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}"
|
||||
# - ./autogen.sh
|
||||
script:
|
||||
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr --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-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
|
||||
artifacts:
|
||||
paths:
|
||||
- doc/
|
||||
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:
|
||||
@@ -142,10 +119,11 @@ stages:
|
||||
- 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"
|
||||
@@ -156,18 +134,23 @@ stages:
|
||||
- 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/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
|
||||
@@ -178,25 +161,36 @@ 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
|
||||
|
||||
docs:debian:sid:amd64:
|
||||
🐞:sid:amd64:
|
||||
<<: *precheck_job
|
||||
script: util/check-cocci
|
||||
|
||||
# Jobs for doc builds on Debian Sid (amd64)
|
||||
|
||||
docs:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: test
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
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'
|
||||
- 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:
|
||||
push:docs:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: push
|
||||
dependencies: []
|
||||
@@ -204,33 +198,11 @@ push:docs:
|
||||
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
|
||||
only:
|
||||
- master@isc-projects/bind9
|
||||
- /^v9_.*$/@isc-projects/bind9
|
||||
- /^v9_[1-9][0-9]$/@isc-projects/bind9
|
||||
|
||||
#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
|
||||
# Jobs for regular GCC builds on CentOS 6 (amd64)
|
||||
|
||||
build:centos:centos6:amd64:
|
||||
gcc:centos6:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
@@ -238,7 +210,21 @@ build:centos:centos6:amd64:
|
||||
<<: *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"
|
||||
@@ -246,29 +232,64 @@ build:centos:centos7:amd64:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:clang:debian:stretch:amd64:
|
||||
variables:
|
||||
CC: clang
|
||||
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *build_job
|
||||
system:gcc:centos7:amd64:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- gcc:centos7:amd64
|
||||
|
||||
build:debian:jessie: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
|
||||
EXTRA_CONFIGURE: "--without-cmocka --with-python"
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:debian:stretch:amd64:
|
||||
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
|
||||
|
||||
build:debian:sid:amd64:
|
||||
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"
|
||||
@@ -276,106 +297,144 @@ build:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:clang:debian:stretch:i386:
|
||||
install:gcc:sid:amd64:
|
||||
<<: *default_triggering_rules
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: test
|
||||
script:
|
||||
- make install
|
||||
dependencies:
|
||||
- gcc:sid:amd64
|
||||
|
||||
system:gcc:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- 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:
|
||||
- gcc:sid:i386
|
||||
|
||||
unit:gcc:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- gcc:sid:i386
|
||||
|
||||
# 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
|
||||
|
||||
build:debian:sid:i386:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
EXTRA_CONFIGURE: "--with-libidn2"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
# Jobs for PKCS#11-enabled GCC builds on Debian Sid (amd64)
|
||||
|
||||
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:jessie:amd64:
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:jessie:amd64
|
||||
|
||||
unittest:debian:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:stretch:amd64
|
||||
|
||||
unittest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
unittest:clang:debian:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:clang:debian:stretch: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:
|
||||
<<: *centos_centos7_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:centos:centos7:amd64
|
||||
|
||||
systemtest:debian:jessie:amd64:
|
||||
<<: *debian_jessie_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:jessie:amd64
|
||||
|
||||
systemtest:debian:stretch:amd64:
|
||||
<<: *debian_stretch_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:stretch:amd64
|
||||
|
||||
systemtest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
systemtest:debian:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:i386
|
||||
|
||||
install:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *install_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
pkcs11:build:debian:sid:amd64:
|
||||
pkcs11:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
@@ -383,14 +442,36 @@ pkcs11:build:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
pkcs11:unittest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- pkcs11:build:debian:sid:amd64
|
||||
|
||||
pkcs11:systemtest:debian:sid:amd64:
|
||||
system:pkcs11:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- pkcs11:build:debian:sid:amd64
|
||||
- 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,19 +1,21 @@
|
||||
## Release Checklist
|
||||
|
||||
- [ ] (Manager) Check for the presence of a milestone for the release.
|
||||
- [ ] (Manager) Check for the presence of a milestone for the release:
|
||||
- If there is a milestone, are all the issues for the milestone resolved? (other than this checklist).
|
||||
- [ ] (Manager) Inform Support/Marketing of impending release (and give estimated release dates).
|
||||
- (SwEng) Prepare the sources for tarball generation.
|
||||
- (SwEng) Prepare the sources for tarball generation:
|
||||
- [ ] Check perflab to ensure there has been no unexplained drop in performance for the version being released.
|
||||
- [ ] Ensure that there are no outstanding merge requests in the private repository (subscription version only).
|
||||
- [ ] Update API files for libraries with new version information.
|
||||
- [ ] Change software version and library versions in configure.in (new major release only).
|
||||
- [ ] Ensure Kyua and ATF files are correct.
|
||||
- [ ] Rebuild configure using autoconf on docs.isc.org.
|
||||
- [ ] Update CHANGES.
|
||||
- [ ] Update CHANGES.SE (subscription branch only).
|
||||
- [ ] Update "version".
|
||||
- [ ] Update "readme.md".
|
||||
- [ ] Ensure the release notes are correct for this release (content, formatting, etc.).
|
||||
- Check the release notes are correct:
|
||||
- [ ] Compare content with merge requests for the release.
|
||||
- [ ] Check formatting.
|
||||
- [ ] Build documentation on docs.isc.org.
|
||||
- [ ] Commit changes and make sure the gitlab-ci tests are passing.
|
||||
- [ ] Push the changes and tag ("alphatag" is an optional string such as "b1", "rc1" etc.). (```git tag -u <DEVELOPER_KEYID> -a -s -m "BIND 9.X.Y[alphatag]" v9_X_Y[alphatag]```)
|
||||
@@ -24,9 +26,19 @@
|
||||
- [ ] (QA) Request the signature on the tarballs.
|
||||
- [ ] (QA) Check signatures on tarballs.
|
||||
- [ ] (QA) Tell Support to handle notification of release.
|
||||
- [ ] (Support) Make tarballs and signatures available to download.
|
||||
- [ ] (Manager) Update [https://wiki.isc.org/bin/view/Main/BindReleaseDates](BIND release dates page) when public announcement has been made.
|
||||
- [ ] (Manager) Inform marketing of the release
|
||||
- [ ] (Manager) Inform Marketing of the release
|
||||
- [ ] (Manager) Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
|
||||
|
||||
- [ ] (SwEng) Update DEB and RPM packages
|
||||
- [ ] (SwEng) Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`)
|
||||
|
||||
## Support
|
||||
- [ ] Make tarballs and signatures available to download.
|
||||
- [ ] Write release email to bind9-announce.
|
||||
- [ ] Write email to bind9-users (if a major release).
|
||||
- [ ] Update tickets in case of waiting support customers.
|
||||
|
||||
## Marketing
|
||||
- [ ] Post short note to Twitter.
|
||||
- [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND).
|
||||
- [ ] Write blog article (if a major release).
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
Content-Type: application/X-atf-atffile; version="1"
|
||||
|
||||
prop: test-suite = bind9
|
||||
|
||||
tp: lib
|
||||
@@ -1,3 +1,237 @@
|
||||
5140. [cleanup] Removed "configure --disable-rpz-nsip" and
|
||||
"--disable-rpz-nsdname" options. "nsip-enable"
|
||||
and "nsdname-enable" both now default to yes,
|
||||
regardless of compile-time settings. [GL #824]
|
||||
|
||||
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]
|
||||
|
||||
5138. [bug] Under some circumstances named could hit an assertion
|
||||
failure when doing qname minimization when using
|
||||
forwarders. [GL #797]
|
||||
|
||||
5137. [func] named now logs messages whenever a mirror zone becomes
|
||||
usable or unusable for resolution purposes. [GL #818]
|
||||
|
||||
5136. [cleanup] Check in named-checkconf that allow-update and
|
||||
allow-update-forwarding are not set at the
|
||||
view/options level; fix documentation. [GL #512]
|
||||
|
||||
5135. [port] sparc: Use smt_pause() instead of pause. [GL #816]
|
||||
|
||||
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]
|
||||
|
||||
5132. [bug] Fix race condition in cleanup part of dns_dt_create().
|
||||
[GL !1323]
|
||||
|
||||
5131. [cleanup] Address Coverity warnings. [GL #801]
|
||||
|
||||
5130. [cleanup] Remove support for l10n message catalogs. [GL #709]
|
||||
|
||||
5129. [contrib] sdlz_helper.c:build_querylist was not properly
|
||||
splitting the query string. [GL #798]
|
||||
|
||||
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]
|
||||
|
||||
5120. [placeholder]
|
||||
|
||||
5119. [placeholder]
|
||||
|
||||
5118. [placeholder]
|
||||
|
||||
5117. [placeholder]
|
||||
|
||||
5116. [bug] Named/named-checkconf triggered a assertion when
|
||||
a mirror zone's name is bad. [GL #778]
|
||||
|
||||
5115. [bug] Allow unsupported algorithms in zone when not used for
|
||||
signing with dnssec-signzone. [GL #783]
|
||||
|
||||
5114. [func] Include a 'reconfig/reload in progress' status line
|
||||
in rndc status, use it in tests.
|
||||
|
||||
5113. [port] Fixed a Windows build error.
|
||||
|
||||
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. [placeholder]
|
||||
|
||||
5109. [cleanup] Remove support for RSAMD5 algorithm. [GL #628]
|
||||
|
||||
--- 9.13.5 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]
|
||||
|
||||
5106. [experimental] A new "plugin" mechanism has been added to allow
|
||||
extension of query processing functionality through
|
||||
the use of dynamically loadable libraries. A
|
||||
"filter-aaaa.so" plugin has been implemented,
|
||||
replacing the filter-aaaa feature that was formerly
|
||||
implemented as a native part of BIND.
|
||||
|
||||
The "filter-aaaa", "filter-aaaa-on-v4" and
|
||||
"filter-aaaa-on-v6" options can no longer be
|
||||
configured using native named.conf syntax. However,
|
||||
loading the filter-aaaa.so plugin and setting its
|
||||
parameters provides identical functionality.
|
||||
|
||||
Note that the plugin API is a work in progress and
|
||||
is likely to evolve as further plugins are
|
||||
implemented. [GL #15]
|
||||
|
||||
5105. [bug] Fix a race between process_fd and socketclose in
|
||||
unix socket code. [GL #744]
|
||||
|
||||
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 and
|
||||
remove the dnspython dependency accidentally introduced
|
||||
by change 4970. [GL #730]
|
||||
|
||||
5100. [func] Pin resolver tasks to specific task queues. [GL !1117]
|
||||
|
||||
5099. [func] Failed mutex and conditional creations are always
|
||||
fatal. [GL #674]
|
||||
|
||||
--- 9.13.4 released ---
|
||||
|
||||
5098. [func] Failed memory allocations are now fatal. [GL #674]
|
||||
|
||||
5097. [cleanup] Remove embedded ATF unit testing framework
|
||||
from BIND source distribution. [GL !875]
|
||||
|
||||
5096. [func] Use multiple event loops in socket code, and
|
||||
make network threads CPU-affinitive. This
|
||||
significantly improves performance on large
|
||||
systems. [GL #666]
|
||||
|
||||
5095. [test] Converted all unit tests from ATF to CMocka;
|
||||
removed the source code for the ATF libraries.
|
||||
Build with "configure --with-cmocka" to enable
|
||||
unit testing. [GL #620]
|
||||
|
||||
5094. [func] Add 'dig -r' to disable reading of .digrc. [GL !970]
|
||||
|
||||
5093. [bug] Log lame qname-minimization servers only if they're
|
||||
really lame. [GL #671]
|
||||
|
||||
5092. [bug] Address memory leak on SIGTERM in nsupdate when using
|
||||
GSS-TSIG. [GL #558]
|
||||
|
||||
5091. [func] Two new global and per-view options min-cache-ttl
|
||||
and min-ncache-ttl [GL #613]
|
||||
|
||||
5090. [bug] dig and mdig failed to properly preparse dash value
|
||||
pairs when value was a seperate argument and started
|
||||
with a dash. [GL #584]
|
||||
|
||||
5089. [bug] Restore localhost fallback in dig and host which is
|
||||
used when no nameserver addresses present in
|
||||
/etc/resolv.conf are usable due to the requested
|
||||
address family restrictions. [GL #433]
|
||||
|
||||
5088. [bug] dig/host/nslookup could crash when interrupted close to
|
||||
a query timeout. [GL #599]
|
||||
|
||||
5087. [test] Check that result tables are complete. [GL #676]
|
||||
|
||||
5086. [func] Log of RPZ now includes the QTYPE and QCLASS. [GL #623]
|
||||
|
||||
5085. [bug] win32: Restore looking up nameservers, search list,
|
||||
etc. [GL #186]
|
||||
|
||||
5084. [placeholder]
|
||||
|
||||
5083. [func] Add autoconf macro AX_POSIX_SHELL, so we
|
||||
can use POSIX-compatible shell features
|
||||
in the scripts.
|
||||
|
||||
5082. [bug] Fixed a race that could cause a crash in
|
||||
dig/host/nslookup. [GL #650]
|
||||
|
||||
5081. [func] Use per-worker queues in task manager, make task
|
||||
runners CPU-affine. [GL #659]
|
||||
|
||||
5080. [func] Improvements to "rndc nta" user interface:
|
||||
- catch and report invalid command line options
|
||||
- when removing an NTA from all views, do not
|
||||
abort with an error if the NTA was not found
|
||||
in one of the views
|
||||
- include the view name in "rndc nta -dump"
|
||||
output, for consistency with the add and remove
|
||||
actions
|
||||
Thanks to Tony Finch. [GL !816]
|
||||
|
||||
5079. [func] Disable IDN processing in dig and nslookup
|
||||
when not on a tty. [GL #653]
|
||||
|
||||
5078. [cleanup] Require python components to be explicitly disabled if
|
||||
python is not available on unix platforms. [GL #601]
|
||||
|
||||
5077. [cleanup] Remove ip6.int support (-i) from dig and mdig.
|
||||
[GL !969]
|
||||
|
||||
5076. [bug] "require-server-cookie" was not effective if
|
||||
"rate-limit" was configured. [GL #617]
|
||||
|
||||
5075. [bug] Refresh nameservers from cache when sending final
|
||||
query in qname minimization. [GL #16]
|
||||
|
||||
5074. [cleanup] Remove vector socket functions - isc_socket_recvv(),
|
||||
isc_socket_sendtov(), isc_socket_sendtov2(),
|
||||
isc_socket_sendv() - in order to simplify socket code.
|
||||
[GL #645]
|
||||
|
||||
5073. [bug] Destroy a task first when destroying rpzs and catzs.
|
||||
[GL #84]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1996-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 1996-2019 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
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ top_builddir = @top_builddir@
|
||||
|
||||
VERSION=@BIND9_VERSION@
|
||||
|
||||
SUBDIRS = make unit lib fuzz bin doc
|
||||
SUBDIRS = make lib fuzz bin doc
|
||||
TARGETS =
|
||||
PREREQS = bind.keys.h
|
||||
|
||||
|
||||
@@ -59,3 +59,31 @@ These are platforms on which BIND is known not to build or run:
|
||||
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
|
||||
* Platforms that don't support atomic operations (via compiler or
|
||||
library)
|
||||
* Linux without NPTL (Native POSIX Thread Library)
|
||||
|
||||
Platform quirks
|
||||
|
||||
ARM
|
||||
|
||||
If the compilation ends with following error:
|
||||
|
||||
Error: selected processor does not support `yield' in ARM mode
|
||||
|
||||
You will need to set -march compiler option to native, so the compiler
|
||||
recognizes yield assembler instruction. The proper way to set -march=
|
||||
native would be to put it into CFLAGS, e.g. run ./configure like this:
|
||||
CFLAGS="-march=native -Os -g" ./configure plus your usual options.
|
||||
|
||||
If that doesn't work, you can enforce the minimum CPU and FPU (taken from
|
||||
Debian armhf documentation):
|
||||
|
||||
* The lowest worthwhile CPU implementation is Armv7-A, therefore the
|
||||
recommended build option is -march=armv7-a.
|
||||
|
||||
* FPU should be set at VFPv3-D16 as they represent the miminum
|
||||
specification of the processors to support here, therefore the
|
||||
recommended build option is -mfpu=vfpv3-d16.
|
||||
|
||||
The configure command should look like this:
|
||||
|
||||
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
|
||||
|
||||
@@ -104,6 +104,11 @@ BIND 9.13 features
|
||||
BIND 9.13 is the newest development branch of BIND 9. It includes a number
|
||||
of changes from BIND 9.12 and earlier releases. New features include:
|
||||
|
||||
* A new "plugin" mechanism has been added to allow query functionality
|
||||
to be extended using dynamically loadable libraries. The "filter-aaaa"
|
||||
feature has been removed from named and is now implemented as a
|
||||
plugin.
|
||||
* Socket and task code has been refactored to improve performance.
|
||||
* QNAME minimization, as described in RFC 7816, is now supported.
|
||||
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||
via a special query which trust anchors are configured for the root
|
||||
@@ -289,8 +294,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
|
||||
|
||||
|
||||
@@ -122,6 +122,10 @@ BIND 9.13 is the newest development branch of BIND 9. It includes a
|
||||
number of changes from BIND 9.12 and earlier releases. New features
|
||||
include:
|
||||
|
||||
* A new "plugin" mechanism has been added to allow query functionality
|
||||
to be extended using dynamically loadable libraries. The "filter-aaaa"
|
||||
feature has been removed from named and is now implemented as a plugin.
|
||||
* Socket and task code has been refactored to improve performance.
|
||||
* QNAME minimization, as described in RFC 7816, is now supported.
|
||||
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||
via a special query which trust anchors are configured for the root zone.
|
||||
@@ -143,7 +147,7 @@ for more details.
|
||||
Cryptographic support has been modernized. BIND now uses the
|
||||
best available pseudo-random number generator for the platform on which
|
||||
it's built. Very old versions of OpenSSL are no longer supported.
|
||||
Cryptography is now mandatory: building BIND without DNSSEC is now
|
||||
Cryptography is now mandatory: building BIND without DNSSEC is no
|
||||
longer supported.
|
||||
|
||||
Special code to support certain legacy operating systems has also
|
||||
@@ -307,9 +311,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
+1
@@ -289,6 +289,7 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
|
||||
m4_include([m4/ax_check_openssl.m4])
|
||||
m4_include([m4/ax_posix_shell.m4])
|
||||
m4_include([m4/ax_pthread.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
|
||||
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
|
||||
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
|
||||
TARGETS =
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
@@ -66,7 +66,7 @@ named-checkzone.@O@: named-checkzone.c
|
||||
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
|
||||
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
|
||||
export LIBS0="${NSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
||||
export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
named-checkconf \- named configuration file syntax checking tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBnamed\-checkconf\fR\ 'u
|
||||
\fBnamed\-checkconf\fR [\fB\-hjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
|
||||
\fBnamed\-checkconf\fR [\fB\-chjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed\-checkconf\fR
|
||||
@@ -79,6 +79,13 @@ When loading a zonefile read the journal if it exists\&.
|
||||
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
|
||||
.RE
|
||||
.PP
|
||||
\-c
|
||||
.RS 4
|
||||
Check "core" configuration only\&. This suppresses the loading of plugin modules, and causes all parameters to
|
||||
\fBplugin\fR
|
||||
statements to be ignored\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p
|
||||
.RS 4
|
||||
Print out the
|
||||
|
||||
+34
-13
@@ -46,6 +46,8 @@
|
||||
|
||||
static const char *program = "named-checkconf";
|
||||
|
||||
static bool loadplugins = true;
|
||||
|
||||
isc_log_t *logc = NULL;
|
||||
|
||||
#define CHECK(r)\
|
||||
@@ -282,8 +284,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;
|
||||
@@ -300,8 +304,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;
|
||||
@@ -327,8 +333,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;
|
||||
@@ -345,8 +353,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;
|
||||
@@ -366,8 +376,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;
|
||||
}
|
||||
@@ -383,8 +395,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;
|
||||
@@ -394,14 +408,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;
|
||||
@@ -548,7 +564,7 @@ main(int argc, char **argv) {
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
*/
|
||||
#define CMDLINE_FLAGS "dhjlm:t:pvxz"
|
||||
#define CMDLINE_FLAGS "cdhjlm:t:pvxz"
|
||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (c) {
|
||||
case 'm':
|
||||
@@ -573,6 +589,10 @@ main(int argc, char **argv) {
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
loadplugins = false;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
debug++;
|
||||
break;
|
||||
@@ -663,9 +683,10 @@ main(int argc, char **argv) {
|
||||
ISC_R_SUCCESS)
|
||||
exit(1);
|
||||
|
||||
result = bind9_check_namedconf(config, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
exit_status = 1;
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
|
||||
result = load_zones_fromconfig(config, mctx, list_zones);
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -52,7 +53,7 @@
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>named-checkconf</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-hjlvz</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-chjlvz</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p</option>
|
||||
<arg choice="opt" rep="norepeat"><option>-x</option>
|
||||
</arg></arg>
|
||||
@@ -114,6 +115,17 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Check "core" configuration only. This suppresses the loading
|
||||
of plugin modules, and causes all parameters to
|
||||
<command>plugin</command> statements to be ignored.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">named-checkconf</code>
|
||||
[<code class="option">-hjlvz</code>]
|
||||
[<code class="option">-chjlvz</code>]
|
||||
[<code class="option">-p</code>
|
||||
[<code class="option">-x</code>
|
||||
]]
|
||||
@@ -88,6 +88,14 @@
|
||||
(e.g. master or slave).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-c</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Check "core" configuration only. This suppresses the loading
|
||||
of plugin modules, and causes all parameters to
|
||||
<span class="command"><strong>plugin</strong></span> statements to be ignored.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-p</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -139,12 +139,14 @@ main(int argc, char **argv) {
|
||||
#define PROGCMP(X) \
|
||||
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
|
||||
|
||||
if (PROGCMP("named-checkzone"))
|
||||
if (PROGCMP("named-checkzone")) {
|
||||
progmode = progmode_check;
|
||||
else if (PROGCMP("named-compilezone"))
|
||||
} else if (PROGCMP("named-compilezone")) {
|
||||
progmode = progmode_compile;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/* Compilation specific defaults */
|
||||
if (progmode == progmode_compile) {
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -125,10 +125,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;
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
+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));
|
||||
@@ -1167,6 +1174,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;
|
||||
@@ -1224,6 +1233,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
/* NOTREACHED */
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
if (strlen(option) > 1U)
|
||||
option = &option[1];
|
||||
@@ -1367,8 +1377,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]) {
|
||||
@@ -1391,6 +1403,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
+20
-12
@@ -74,7 +74,9 @@ will perform an NS query for "\&." (the root)\&.
|
||||
It is possible to set per\-user defaults for
|
||||
\fBdig\fR
|
||||
via
|
||||
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&.
|
||||
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&. The
|
||||
\fB\-r\fR
|
||||
option disables this feature, for scripts that need predictable behaviour\&.
|
||||
.PP
|
||||
The IN and CH class names overlap with the IN and CH top level domain names\&. Either use the
|
||||
\fB\-t\fR
|
||||
@@ -174,11 +176,6 @@ reads a list of lookup requests to process from the given
|
||||
using the command\-line interface\&.
|
||||
.RE
|
||||
.PP
|
||||
\-i
|
||||
.RS 4
|
||||
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC 2874) are not attempted\&.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fIkeyfile\fR
|
||||
.RS 4
|
||||
Sign queries using TSIG using a key read from the given file\&. Key files can be generated using
|
||||
@@ -208,6 +205,12 @@ The domain name to query\&. This is useful to distinguish the
|
||||
from other arguments\&.
|
||||
.RE
|
||||
.PP
|
||||
\-r
|
||||
.RS 4
|
||||
Do not read options from
|
||||
${HOME}/\&.digrc\&. This is useful for scripts that need predictable behaviour\&.
|
||||
.RE
|
||||
.PP
|
||||
\-t \fItype\fR
|
||||
.RS 4
|
||||
The resource record type to query\&. It can be any valid query type\&. If it is a resource record type supported in BIND 9, it can be given by the type mnemonic (such as "NS" or "AAAA")\&. The default query type is "A", unless the
|
||||
@@ -246,9 +249,7 @@ arguments\&.
|
||||
\fBdig\fR
|
||||
automatically performs a lookup for a name like
|
||||
94\&.2\&.0\&.192\&.in\-addr\&.arpa
|
||||
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain (but see also the
|
||||
\fB\-i\fR
|
||||
option)\&.
|
||||
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain\&.
|
||||
.RE
|
||||
.PP
|
||||
\-y \fI[hmac:]\fR\fIkeyname:secret\fR
|
||||
@@ -468,12 +469,16 @@ option is enabled\&. If short form answers are requested, the default is not to
|
||||
.PP
|
||||
\fB+[no]idnin\fR
|
||||
.RS 4
|
||||
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to process IDN input\&.
|
||||
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&.
|
||||
.sp
|
||||
The default is to process IDN input when standard output is a tty\&. The IDN processing on input is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]idnout\fR
|
||||
.RS 4
|
||||
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to convert output\&.
|
||||
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&.
|
||||
.sp
|
||||
The default is to process puny code on output when standard output is a tty\&. The puny code processing on output is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]ignore\fR
|
||||
@@ -795,7 +800,10 @@ has been built with IDN (internationalized domain name) support, it can accept a
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, use parameters
|
||||
\fI+noidnin\fR
|
||||
and
|
||||
\fI+noidnout\fR\&.
|
||||
\fI+noidnout\fR
|
||||
or define the
|
||||
\fBIDN_DISABLE\fR
|
||||
environment variable\&.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
/etc/resolv\&.conf
|
||||
|
||||
+43
-11
@@ -65,8 +65,8 @@ static char domainopt[DNS_NAME_MAXTEXT];
|
||||
static char hexcookie[81];
|
||||
|
||||
static bool short_form = false, printcmd = true,
|
||||
ip6_int = false, plusquest = false, pluscomm = false,
|
||||
ipv4only = false, ipv6only = false;
|
||||
plusquest = false, pluscomm = false,
|
||||
ipv4only = false, ipv6only = false, digrc = true;
|
||||
static uint32_t splitwidth = 0xffffffff;
|
||||
|
||||
/*% opcode text */
|
||||
@@ -153,11 +153,11 @@ help(void) {
|
||||
" -b address[#port] (bind to source address/port)\n"
|
||||
" -c class (specify query class)\n"
|
||||
" -f filename (batch mode)\n"
|
||||
" -i (use IP6.INT for IPv6 reverse lookups)\n"
|
||||
" -k keyfile (specify tsig key file)\n"
|
||||
" -m (enable memory usage debugging)\n"
|
||||
" -p port (specify port number)\n"
|
||||
" -q name (specify query name)\n"
|
||||
" -r (do not read ~/.digrc)\n"
|
||||
" -t type (specify query type)\n"
|
||||
" -u (display times in usec instead of msec)\n"
|
||||
" -x dot-notation (shortcut for reverse lookups)\n"
|
||||
@@ -193,8 +193,10 @@ help(void) {
|
||||
" +[no]fail (Don't try next server on SERVFAIL)\n"
|
||||
" +[no]header-only (Send query without a question section)\n"
|
||||
" +[no]identify (ID responders in short answers)\n"
|
||||
" +[no]idnin (Parse IDN names)\n"
|
||||
" +[no]idnout (Convert IDN response)\n"
|
||||
#ifdef HAVE_LIBIDN2
|
||||
" +[no]idnin (Parse IDN names [default=on on tty])\n"
|
||||
" +[no]idnout (Convert IDN response [default=on on tty])\n"
|
||||
#endif
|
||||
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
|
||||
" +[no]keepalive (Request EDNS TCP keepalive)\n"
|
||||
" +[no]keepopen (Keep the TCP socket open between queries)\n"
|
||||
@@ -1542,8 +1544,8 @@ plus_option(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,
|
||||
@@ -1606,7 +1608,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
exit(0);
|
||||
break;
|
||||
case 'i':
|
||||
ip6_int = true;
|
||||
/* deprecated */
|
||||
break;
|
||||
case 'm': /* memdebug */
|
||||
/* memdebug is handled in preparse_args() */
|
||||
@@ -1614,6 +1616,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':
|
||||
(*lookup)->use_usec = true;
|
||||
break;
|
||||
@@ -1787,13 +1793,12 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
*lookup = clone_lookup(default_lookup, true);
|
||||
*need_clone = true;
|
||||
if (get_reverse(textname, sizeof(textname), value,
|
||||
ip6_int, false) == ISC_R_SUCCESS) {
|
||||
false) == ISC_R_SUCCESS) {
|
||||
strlcpy((*lookup)->textname, textname,
|
||||
sizeof((*lookup)->textname));
|
||||
debug("looking up %s", (*lookup)->textname);
|
||||
(*lookup)->trace_root = ((*lookup)->trace ||
|
||||
(*lookup)->ns_search_only);
|
||||
(*lookup)->ip6_int = ip6_int;
|
||||
if (!(*lookup)->rdtypeset)
|
||||
(*lookup)->rdtype = dns_rdatatype_ptr;
|
||||
if (!(*lookup)->rdclassset)
|
||||
@@ -1841,11 +1846,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");
|
||||
@@ -1859,6 +1876,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1925,8 +1956,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)) {
|
||||
|
||||
+30
-18
@@ -52,6 +52,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -131,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>
|
||||
@@ -271,17 +273,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
|
||||
domain, which is no longer in use. Obsolete bit string
|
||||
label queries (RFC 2874) are not attempted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k <replaceable class="parameter">keyfile</replaceable></term>
|
||||
<listitem>
|
||||
@@ -334,6 +325,16 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Do not read options from <filename>${HOME}/.digrc</filename>.
|
||||
This is useful for scripts that need predictable behaviour.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||
<listitem>
|
||||
@@ -394,8 +395,7 @@
|
||||
<literal>94.2.0.192.in-addr.arpa</literal> and sets the
|
||||
query type and class to PTR and IN respectively. IPv6
|
||||
addresses are looked up using nibble format under the
|
||||
IP6.ARPA domain (but see also the <option>-i</option>
|
||||
option).
|
||||
IP6.ARPA domain.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -789,7 +789,13 @@
|
||||
<para>
|
||||
Process [do not process] IDN domain names on input.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to process IDN input.
|
||||
compile time.
|
||||
</para>
|
||||
<para>
|
||||
The default is to process IDN input when standard output
|
||||
is a tty. The IDN processing on input is disabled when
|
||||
dig output is redirected to files, pipes, and other
|
||||
non-tty file descriptors.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -800,7 +806,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>
|
||||
|
||||
+29
-16
@@ -106,9 +106,10 @@
|
||||
|
||||
<p>
|
||||
It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
|
||||
<code class="filename">${HOME}/.digrc</code>. This file is read and
|
||||
any options in it
|
||||
are applied before the command line arguments.
|
||||
<code class="filename">${HOME}/.digrc</code>. This file is read and any
|
||||
options in it are applied before the command line arguments.
|
||||
The <code class="option">-r</code> option disables this feature, for
|
||||
scripts that need predictable behaviour.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -227,14 +228,6 @@
|
||||
<span class="command"><strong>dig</strong></span> using the command-line interface.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-i</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
|
||||
domain, which is no longer in use. Obsolete bit string
|
||||
label queries (RFC 2874) are not attempted.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -274,6 +267,13 @@
|
||||
the <em class="parameter"><code>name</code></em> from other arguments.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-r</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Do not read options from <code class="filename">${HOME}/.digrc</code>.
|
||||
This is useful for scripts that need predictable behaviour.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -324,8 +324,7 @@
|
||||
<code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
|
||||
query type and class to PTR and IN respectively. IPv6
|
||||
addresses are looked up using nibble format under the
|
||||
IP6.ARPA domain (but see also the <code class="option">-i</code>
|
||||
option).
|
||||
IP6.ARPA domain.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
|
||||
@@ -631,7 +630,13 @@
|
||||
<p>
|
||||
Process [do not process] IDN domain names on input.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to process IDN input.
|
||||
compile time.
|
||||
</p>
|
||||
<p>
|
||||
The default is to process IDN input when standard output
|
||||
is a tty. The IDN processing on input is disabled when
|
||||
dig output is redirected to files, pipes, and other
|
||||
non-tty file descriptors.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
|
||||
@@ -639,7 +644,13 @@
|
||||
<p>
|
||||
Convert [do not convert] puny code on output.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to convert output.
|
||||
compile time.
|
||||
</p>
|
||||
<p>
|
||||
The default is to process puny code on output when
|
||||
standard output is a tty. The puny code processing on
|
||||
output is disabled when dig output is redirected to
|
||||
files, pipes, and other non-tty file descriptors.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
|
||||
@@ -1061,7 +1072,9 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, use
|
||||
parameters <em class="parameter"><code>+noidnin</code></em> and
|
||||
<em class="parameter"><code>+noidnout</code></em>.
|
||||
<em class="parameter"><code>+noidnout</code></em> or define
|
||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
+175
-152
@@ -312,8 +312,7 @@ reverse_octets(const char *in, char **p, char *end) {
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
|
||||
bool strict)
|
||||
get_reverse(char *reverse, size_t len, char *value, bool strict)
|
||||
{
|
||||
int r;
|
||||
isc_result_t result;
|
||||
@@ -327,8 +326,6 @@ get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
|
||||
dns_name_t *name;
|
||||
unsigned int options = 0;
|
||||
|
||||
if (ip6_int)
|
||||
options |= DNS_BYADDROPT_IPV6INT;
|
||||
name = dns_fixedname_initname(&fname);
|
||||
result = dns_byaddr_createptrname(&addr, options, name);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
@@ -628,7 +625,7 @@ make_empty_lookup(void) {
|
||||
looknew->ttlunits = false;
|
||||
looknew->qr = false;
|
||||
#ifdef HAVE_LIBIDN2
|
||||
looknew->idnin = (getenv("IDN_DISABLE") == NULL);
|
||||
looknew->idnin = isatty(1)?(getenv("IDN_DISABLE") == NULL):false;
|
||||
looknew->idnout = looknew->idnin;
|
||||
#else
|
||||
looknew->idnin = false;
|
||||
@@ -652,7 +649,6 @@ make_empty_lookup(void) {
|
||||
looknew->nsfound = 0;
|
||||
looknew->tcp_mode = false;
|
||||
looknew->tcp_mode_set = false;
|
||||
looknew->ip6_int = false;
|
||||
looknew->comments = true;
|
||||
looknew->stats = true;
|
||||
looknew->section_question = true;
|
||||
@@ -1231,6 +1227,19 @@ create_search_list(irs_resconf_t *resconf) {
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* Append 'addr' to the list of servers to be queried. This function is only
|
||||
* called when no server addresses are explicitly specified and either libirs
|
||||
* returns an empty list of servers to use or none of the addresses returned by
|
||||
* libirs are usable due to the specified address family restrictions.
|
||||
*/
|
||||
static void
|
||||
add_fallback_nameserver(const char *addr) {
|
||||
dig_server_t *server = make_server(addr, addr);
|
||||
ISC_LINK_INIT(server, link);
|
||||
ISC_LIST_APPEND(server_list, server, link);
|
||||
}
|
||||
|
||||
/*%
|
||||
* Setup the system as a whole, reading key information and resolv.conf
|
||||
* settings.
|
||||
@@ -1276,6 +1285,16 @@ setup_system(bool ipv4only, bool ipv6only) {
|
||||
get_server_list(resconf);
|
||||
}
|
||||
|
||||
/* If we don't find a nameserver fall back to localhost */
|
||||
if (ISC_LIST_EMPTY(server_list)) {
|
||||
if (have_ipv6) {
|
||||
add_fallback_nameserver("::1");
|
||||
}
|
||||
if (have_ipv4) {
|
||||
add_fallback_nameserver("127.0.0.1");
|
||||
}
|
||||
}
|
||||
|
||||
irs_resconf_destroy(&resconf);
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
@@ -1371,8 +1390,7 @@ setup_libs(void) {
|
||||
isc_mempool_setfreemax(commctx, 6);
|
||||
isc_mempool_setfillcount(commctx, 2);
|
||||
|
||||
result = isc_mutex_init(&lookup_lock);
|
||||
check_result(result, "isc_mutex_init");
|
||||
isc_mutex_init(&lookup_lock);
|
||||
}
|
||||
|
||||
typedef struct dig_ednsoptname {
|
||||
@@ -1523,23 +1541,21 @@ clear_query(dig_query_t *query) {
|
||||
|
||||
debug("clear_query(%p)", query);
|
||||
|
||||
if (query->timer != NULL)
|
||||
if (query->timer != NULL) {
|
||||
isc_timer_detach(&query->timer);
|
||||
}
|
||||
lookup = query->lookup;
|
||||
|
||||
if (lookup->current_query == query)
|
||||
if (lookup->current_query == query) {
|
||||
lookup->current_query = NULL;
|
||||
}
|
||||
|
||||
if (ISC_LINK_LINKED(query, link))
|
||||
if (ISC_LINK_LINKED(query, link)) {
|
||||
ISC_LIST_UNLINK(lookup->q, query, link);
|
||||
if (ISC_LINK_LINKED(query, clink))
|
||||
}
|
||||
if (ISC_LINK_LINKED(query, clink)) {
|
||||
ISC_LIST_UNLINK(lookup->connecting, query, clink);
|
||||
if (ISC_LINK_LINKED(&query->recvbuf, link))
|
||||
ISC_LIST_DEQUEUE(query->recvlist, &query->recvbuf,
|
||||
link);
|
||||
if (ISC_LINK_LINKED(&query->lengthbuf, link))
|
||||
ISC_LIST_DEQUEUE(query->lengthlist, &query->lengthbuf,
|
||||
link);
|
||||
}
|
||||
INSIST(query->recvspace != NULL);
|
||||
|
||||
if (query->sock != NULL) {
|
||||
@@ -1548,12 +1564,16 @@ clear_query(dig_query_t *query) {
|
||||
debug("sockcount=%d", sockcount);
|
||||
}
|
||||
isc_mempool_put(commctx, query->recvspace);
|
||||
isc_mempool_put(commctx, query->tmpsendspace);
|
||||
isc_buffer_invalidate(&query->recvbuf);
|
||||
isc_buffer_invalidate(&query->lengthbuf);
|
||||
if (query->waiting_senddone)
|
||||
|
||||
if (query->waiting_senddone) {
|
||||
query->pending_free = true;
|
||||
else
|
||||
} else {
|
||||
query->magic = 0;
|
||||
isc_mem_free(mctx, query);
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
@@ -2293,7 +2313,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;
|
||||
@@ -2350,6 +2370,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
isc_buffer_init(&b, ecsbuf, sizeof(ecsbuf));
|
||||
@@ -2461,13 +2482,14 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
|
||||
for (serv = ISC_LIST_HEAD(lookup->my_server_list);
|
||||
serv != NULL;
|
||||
serv = ISC_LIST_NEXT(serv, link)) {
|
||||
serv = ISC_LIST_NEXT(serv, link))
|
||||
{
|
||||
query = isc_mem_allocate(mctx, sizeof(dig_query_t));
|
||||
if (query == NULL)
|
||||
if (query == NULL) {
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
debug("create query %p linked to lookup %p",
|
||||
query, lookup);
|
||||
}
|
||||
debug("create query %p linked to lookup %p", query, lookup);
|
||||
query->lookup = lookup;
|
||||
query->timer = NULL;
|
||||
query->waiting_connect = false;
|
||||
@@ -2488,20 +2510,24 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
query->msg_count = 0;
|
||||
query->byte_count = 0;
|
||||
query->ixfr_axfr = false;
|
||||
ISC_LIST_INIT(query->recvlist);
|
||||
ISC_LIST_INIT(query->lengthlist);
|
||||
query->sock = NULL;
|
||||
query->recvspace = isc_mempool_get(commctx);
|
||||
if (query->recvspace == NULL)
|
||||
query->tmpsendspace = isc_mempool_get(commctx);
|
||||
if (query->recvspace == NULL) {
|
||||
fatal("memory allocation failure");
|
||||
}
|
||||
|
||||
isc_buffer_init(&query->recvbuf, query->recvspace, COMMSIZE);
|
||||
isc_buffer_init(&query->lengthbuf, query->lengthspace, 2);
|
||||
isc_buffer_init(&query->slbuf, query->slspace, 2);
|
||||
isc_buffer_init(&query->tmpsendbuf, query->tmpsendspace,
|
||||
COMMSIZE);
|
||||
query->sendbuf = lookup->renderbuf;
|
||||
|
||||
ISC_LINK_INIT(query, clink);
|
||||
ISC_LINK_INIT(query, link);
|
||||
|
||||
query->magic = DIG_QUERY_MAGIC;
|
||||
|
||||
ISC_LIST_ENQUEUE(lookup->q, query, link);
|
||||
}
|
||||
|
||||
@@ -2510,9 +2536,10 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
extrabytes = 0;
|
||||
dighost_printmessage(ISC_LIST_HEAD(lookup->q),
|
||||
lookup->sendmsg, true);
|
||||
if (lookup->stats)
|
||||
if (lookup->stats) {
|
||||
printf(";; QUERY SIZE: %u\n\n",
|
||||
isc_buffer_usedlength(&lookup->renderbuf));
|
||||
}
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
@@ -2523,8 +2550,6 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
*/
|
||||
static void
|
||||
send_done(isc_task_t *_task, isc_event_t *event) {
|
||||
isc_socketevent_t *sevent = (isc_socketevent_t *)event;
|
||||
isc_buffer_t *b = NULL;
|
||||
dig_query_t *query, *next;
|
||||
dig_lookup_t *l;
|
||||
|
||||
@@ -2539,28 +2564,27 @@ send_done(isc_task_t *_task, isc_event_t *event) {
|
||||
debug("sendcount=%d", sendcount);
|
||||
INSIST(sendcount >= 0);
|
||||
|
||||
for (b = ISC_LIST_HEAD(sevent->bufferlist);
|
||||
b != NULL;
|
||||
b = ISC_LIST_HEAD(sevent->bufferlist)) {
|
||||
ISC_LIST_DEQUEUE(sevent->bufferlist, b, link);
|
||||
isc_mem_free(mctx, b);
|
||||
}
|
||||
|
||||
query = event->ev_arg;
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
query->waiting_senddone = false;
|
||||
l = query->lookup;
|
||||
|
||||
if (l->ns_search_only && !l->trace_root && !l->tcp_mode) {
|
||||
if (!query->pending_free && l->ns_search_only &&
|
||||
!l->trace_root && !l->tcp_mode)
|
||||
{
|
||||
debug("sending next, since searching");
|
||||
next = ISC_LIST_NEXT(query, link);
|
||||
if (next != NULL)
|
||||
if (next != NULL) {
|
||||
send_udp(next);
|
||||
}
|
||||
}
|
||||
|
||||
isc_event_free(&event);
|
||||
|
||||
if (query->pending_free)
|
||||
if (query->pending_free) {
|
||||
query->magic = 0;
|
||||
isc_mem_free(mctx, query);
|
||||
}
|
||||
|
||||
check_if_done();
|
||||
UNLOCK_LOOKUP;
|
||||
@@ -2578,6 +2602,7 @@ cancel_lookup(dig_lookup_t *lookup) {
|
||||
debug("cancel_lookup()");
|
||||
query = ISC_LIST_HEAD(lookup->q);
|
||||
while (query != NULL) {
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
next = ISC_LIST_NEXT(query, link);
|
||||
if (query->sock != NULL) {
|
||||
isc_socket_cancel(query->sock, global_task,
|
||||
@@ -2597,6 +2622,7 @@ bringup_timer(dig_query_t *query, unsigned int default_timeout) {
|
||||
dig_lookup_t *l;
|
||||
unsigned int local_timeout;
|
||||
isc_result_t result;
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
|
||||
debug("bringup_timer()");
|
||||
/*
|
||||
@@ -2661,6 +2687,7 @@ send_tcp_connect(dig_query_t *query) {
|
||||
isc_result_t result;
|
||||
dig_query_t *next;
|
||||
dig_lookup_t *l;
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
|
||||
debug("send_tcp_connect(%p)", query);
|
||||
|
||||
@@ -2703,27 +2730,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)) {
|
||||
@@ -2777,17 +2783,6 @@ send_tcp_connect(dig_query_t *query) {
|
||||
}
|
||||
}
|
||||
|
||||
static isc_buffer_t *
|
||||
clone_buffer(isc_buffer_t *source) {
|
||||
isc_buffer_t *buffer;
|
||||
buffer = isc_mem_allocate(mctx, sizeof(*buffer));
|
||||
if (buffer == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
*buffer = *source;
|
||||
return (buffer);
|
||||
}
|
||||
|
||||
/*%
|
||||
* Send a UDP packet to the remote nameserver, possible starting the
|
||||
* recv action as well. Also make sure that the timer is running and
|
||||
@@ -2797,8 +2792,10 @@ static void
|
||||
send_udp(dig_query_t *query) {
|
||||
dig_lookup_t *l = NULL;
|
||||
isc_result_t result;
|
||||
isc_buffer_t *sendbuf;
|
||||
dig_query_t *next;
|
||||
isc_region_t r;
|
||||
isc_socketevent_t *sevent;
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
|
||||
debug("send_udp(%p)", query);
|
||||
|
||||
@@ -2859,32 +2856,60 @@ send_udp(dig_query_t *query) {
|
||||
check_result(result, "isc_socket_bind");
|
||||
|
||||
query->recv_made = true;
|
||||
ISC_LINK_INIT(&query->recvbuf, link);
|
||||
ISC_LIST_ENQUEUE(query->recvlist, &query->recvbuf,
|
||||
link);
|
||||
isc_buffer_availableregion(&query->recvbuf, &r);
|
||||
debug("recving with lookup=%p, query=%p, sock=%p",
|
||||
query->lookup, query, query->sock);
|
||||
result = isc_socket_recvv(query->sock, &query->recvlist, 1,
|
||||
global_task, recv_done, query);
|
||||
check_result(result, "isc_socket_recvv");
|
||||
result = isc_socket_recv(query->sock, &r, 1,
|
||||
global_task, recv_done, query);
|
||||
check_result(result, "isc_socket_recv");
|
||||
recvcount++;
|
||||
debug("recvcount=%d", recvcount);
|
||||
}
|
||||
ISC_LIST_INIT(query->sendlist);
|
||||
sendbuf = clone_buffer(&query->sendbuf);
|
||||
ISC_LIST_ENQUEUE(query->sendlist, sendbuf, link);
|
||||
isc_buffer_usedregion(&query->sendbuf, &r);
|
||||
debug("sending a request");
|
||||
TIME_NOW(&query->time_sent);
|
||||
INSIST(query->sock != NULL);
|
||||
query->waiting_senddone = true;
|
||||
result = isc_socket_sendtov2(query->sock, &query->sendlist,
|
||||
global_task, send_done, query,
|
||||
&query->sockaddr, NULL,
|
||||
ISC_SOCKFLAG_NORETRY);
|
||||
check_result(result, "isc_socket_sendtov");
|
||||
sevent = isc_socket_socketevent(mctx, query->sock,
|
||||
ISC_SOCKEVENT_SENDDONE,
|
||||
send_done, query);
|
||||
result = isc_socket_sendto2(query->sock, &r,
|
||||
global_task, &query->sockaddr, NULL,
|
||||
sevent, ISC_SOCKFLAG_NORETRY);
|
||||
check_result(result, "isc_socket_sendto2");
|
||||
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
|
||||
@@ -2893,7 +2918,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);
|
||||
@@ -2902,23 +2927,25 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
LOCK_LOOKUP;
|
||||
query = event->ev_arg;
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
l = query->lookup;
|
||||
isc_event_free(&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;
|
||||
@@ -2971,7 +2998,8 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
static void
|
||||
tcp_length_done(isc_task_t *task, isc_event_t *event) {
|
||||
isc_socketevent_t *sevent;
|
||||
isc_buffer_t *b = NULL;
|
||||
isc_buffer_t b;
|
||||
isc_region_t r;
|
||||
isc_result_t result;
|
||||
dig_query_t *query = NULL;
|
||||
dig_lookup_t *l, *n;
|
||||
@@ -2987,14 +3015,11 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
|
||||
LOCK_LOOKUP;
|
||||
sevent = (isc_socketevent_t *)event;
|
||||
query = event->ev_arg;
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
|
||||
recvcount--;
|
||||
INSIST(recvcount >= 0);
|
||||
|
||||
b = ISC_LIST_HEAD(sevent->bufferlist);
|
||||
INSIST(b == &query->lengthbuf);
|
||||
ISC_LIST_DEQUEUE(sevent->bufferlist, b, link);
|
||||
|
||||
if (sevent->result == ISC_R_CANCELED) {
|
||||
isc_event_free(&event);
|
||||
l = query->lookup;
|
||||
@@ -3027,7 +3052,10 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
|
||||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
}
|
||||
length = isc_buffer_getuint16(b);
|
||||
isc_buffer_init(&b, sevent->region.base, sevent->n);
|
||||
isc_buffer_add(&b, sevent->n);
|
||||
length = isc_buffer_getuint16(&b);
|
||||
|
||||
if (length == 0) {
|
||||
isc_event_free(&event);
|
||||
launch_next_query(query, false);
|
||||
@@ -3041,13 +3069,11 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
|
||||
*/
|
||||
isc_buffer_invalidate(&query->recvbuf);
|
||||
isc_buffer_init(&query->recvbuf, query->recvspace, length);
|
||||
ENSURE(ISC_LIST_EMPTY(query->recvlist));
|
||||
ISC_LINK_INIT(&query->recvbuf, link);
|
||||
ISC_LIST_ENQUEUE(query->recvlist, &query->recvbuf, link);
|
||||
isc_buffer_availableregion(&query->recvbuf, &r);
|
||||
debug("recving with lookup=%p, query=%p", query->lookup, query);
|
||||
result = isc_socket_recvv(query->sock, &query->recvlist, length, task,
|
||||
recv_done, query);
|
||||
check_result(result, "isc_socket_recvv");
|
||||
result = isc_socket_recv(query->sock, &r, length, task,
|
||||
recv_done, query);
|
||||
check_result(result, "isc_socket_recv");
|
||||
recvcount++;
|
||||
debug("resubmitted recv request with length %d, recvcount=%d",
|
||||
length, recvcount);
|
||||
@@ -3063,7 +3089,8 @@ static void
|
||||
launch_next_query(dig_query_t *query, bool include_question) {
|
||||
isc_result_t result;
|
||||
dig_lookup_t *l;
|
||||
isc_buffer_t *buffer;
|
||||
isc_region_t r;
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
|
||||
INSIST(!free_now);
|
||||
|
||||
@@ -3082,35 +3109,28 @@ launch_next_query(dig_query_t *query, bool include_question) {
|
||||
return;
|
||||
}
|
||||
|
||||
isc_buffer_clear(&query->slbuf);
|
||||
isc_buffer_clear(&query->lengthbuf);
|
||||
isc_buffer_putuint16(&query->slbuf, (uint16_t) query->sendbuf.used);
|
||||
ISC_LIST_INIT(query->sendlist);
|
||||
ISC_LINK_INIT(&query->slbuf, link);
|
||||
if (!query->first_soa_rcvd) {
|
||||
buffer = clone_buffer(&query->slbuf);
|
||||
ISC_LIST_ENQUEUE(query->sendlist, buffer, link);
|
||||
if (include_question) {
|
||||
buffer = clone_buffer(&query->sendbuf);
|
||||
ISC_LIST_ENQUEUE(query->sendlist, buffer, link);
|
||||
}
|
||||
}
|
||||
|
||||
ISC_LINK_INIT(&query->lengthbuf, link);
|
||||
ISC_LIST_ENQUEUE(query->lengthlist, &query->lengthbuf, link);
|
||||
|
||||
result = isc_socket_recvv(query->sock, &query->lengthlist, 0,
|
||||
global_task, tcp_length_done, query);
|
||||
check_result(result, "isc_socket_recvv");
|
||||
isc_buffer_availableregion(&query->lengthbuf, &r);
|
||||
result = isc_socket_recv(query->sock, &r, 0,
|
||||
global_task, tcp_length_done, query);
|
||||
check_result(result, "isc_socket_recv");
|
||||
recvcount++;
|
||||
debug("recvcount=%d", recvcount);
|
||||
if (!query->first_soa_rcvd) {
|
||||
debug("sending a request in launch_next_query");
|
||||
TIME_NOW(&query->time_sent);
|
||||
query->waiting_senddone = true;
|
||||
result = isc_socket_sendv(query->sock, &query->sendlist,
|
||||
global_task, send_done, query);
|
||||
check_result(result, "isc_socket_sendv");
|
||||
isc_buffer_clear(&query->tmpsendbuf);
|
||||
isc_buffer_putuint16(&query->tmpsendbuf,
|
||||
isc_buffer_usedlength(&query->sendbuf));
|
||||
if (include_question) {
|
||||
isc_buffer_usedregion(&query->sendbuf, &r);
|
||||
isc_buffer_copyregion(&query->tmpsendbuf, &r);
|
||||
}
|
||||
isc_buffer_usedregion(&query->tmpsendbuf, &r);
|
||||
result = isc_socket_send(query->sock, &r,
|
||||
global_task, send_done, query);
|
||||
check_result(result, "isc_socket_send");
|
||||
sendcount++;
|
||||
debug("sendcount=%d", sendcount);
|
||||
}
|
||||
@@ -3143,6 +3163,7 @@ connect_done(isc_task_t *task, isc_event_t *event) {
|
||||
LOCK_LOOKUP;
|
||||
sevent = (isc_socketevent_t *)event;
|
||||
query = sevent->ev_arg;
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
|
||||
INSIST(query->waiting_connect);
|
||||
|
||||
@@ -3460,8 +3481,9 @@ ednsvers(dns_rdataset_t *opt) {
|
||||
static void
|
||||
recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
isc_socketevent_t *sevent = NULL;
|
||||
isc_region_t r;
|
||||
dig_query_t *query = NULL;
|
||||
isc_buffer_t *b = NULL;
|
||||
isc_buffer_t b;
|
||||
dns_message_t *msg = NULL;
|
||||
isc_result_t result;
|
||||
dig_lookup_t *n, *l;
|
||||
@@ -3491,9 +3513,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
REQUIRE(event->ev_type == ISC_SOCKEVENT_RECVDONE);
|
||||
sevent = (isc_socketevent_t *)event;
|
||||
|
||||
b = ISC_LIST_HEAD(sevent->bufferlist);
|
||||
INSIST(b == &query->recvbuf);
|
||||
ISC_LIST_DEQUEUE(sevent->bufferlist, &query->recvbuf, link);
|
||||
isc_buffer_init(&b, sevent->region.base, sevent->n);
|
||||
isc_buffer_add(&b, sevent->n);
|
||||
|
||||
if ((l->tcp_mode) && (query->timer != NULL))
|
||||
isc_timer_touch(query->timer);
|
||||
@@ -3569,7 +3590,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_message_peekheader(b, &id, &msgflags);
|
||||
result = dns_message_peekheader(&b, &id, &msgflags);
|
||||
if (result != ISC_R_SUCCESS || l->sendmsg->id != id) {
|
||||
match = false;
|
||||
if (l->tcp_mode) {
|
||||
@@ -3638,7 +3659,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
parseflags |= DNS_MESSAGEPARSE_BESTEFFORT;
|
||||
parseflags |= DNS_MESSAGEPARSE_IGNORETRUNCATION;
|
||||
}
|
||||
result = dns_message_parse(msg, b, parseflags);
|
||||
result = dns_message_parse(msg, &b, parseflags);
|
||||
if (result == DNS_R_RECOVERABLE) {
|
||||
printf(";; Warning: Message parser reports malformed "
|
||||
"message packet.\n");
|
||||
@@ -3646,7 +3667,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf(";; Got bad packet: %s\n", isc_result_totext(result));
|
||||
hex_dump(b);
|
||||
hex_dump(&b);
|
||||
query->waiting_connect = false;
|
||||
dns_message_destroy(&msg);
|
||||
isc_event_free(&event);
|
||||
@@ -3800,7 +3821,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
|
||||
if (tsigkey != NULL) {
|
||||
result = dns_tsig_verify(&query->recvbuf, msg, NULL, NULL);
|
||||
result = dns_tsig_verify(&b, msg, NULL, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf(";; Couldn't verify signature: %s\n",
|
||||
isc_result_totext(result));
|
||||
@@ -3816,7 +3837,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
check_result(result,"dns_message_getquerytsig");
|
||||
}
|
||||
|
||||
extrabytes = isc_buffer_remaininglength(b);
|
||||
extrabytes = isc_buffer_remaininglength(&b);
|
||||
|
||||
debug("after parse");
|
||||
if (l->doing_xfr && l->xfr_q == NULL) {
|
||||
@@ -3863,8 +3884,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
(l->origin != NULL || l->need_search)) {
|
||||
if (!next_origin(query->lookup) || showsearch) {
|
||||
dighost_printmessage(query, msg, true);
|
||||
dighost_received(b->used, &sevent->address,
|
||||
query);
|
||||
dighost_received(isc_buffer_usedlength(&b),
|
||||
&sevent->address, query);
|
||||
}
|
||||
} else if (!l->trace && !l->ns_search_only) {
|
||||
dighost_printmessage(query, msg, true);
|
||||
@@ -3931,7 +3952,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
} else {
|
||||
|
||||
if (msg->rcode == dns_rcode_noerror || l->origin == NULL) {
|
||||
dighost_received(b->used, &sevent->address, query);
|
||||
dighost_received(isc_buffer_usedlength(&b),
|
||||
&sevent->address, query);
|
||||
}
|
||||
|
||||
if (!query->lookup->ns_search_only)
|
||||
@@ -3955,10 +3977,10 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
udp_mismatch:
|
||||
isc_buffer_invalidate(&query->recvbuf);
|
||||
isc_buffer_init(&query->recvbuf, query->recvspace, COMMSIZE);
|
||||
ISC_LIST_ENQUEUE(query->recvlist, &query->recvbuf, link);
|
||||
result = isc_socket_recvv(query->sock, &query->recvlist, 1,
|
||||
global_task, recv_done, query);
|
||||
check_result(result, "isc_socket_recvv");
|
||||
isc_buffer_availableregion(&query->recvbuf, &r);
|
||||
result = isc_socket_recv(query->sock, &r, 1,
|
||||
global_task, recv_done, query);
|
||||
check_result(result, "isc_socket_recv");
|
||||
recvcount++;
|
||||
isc_event_free(&event);
|
||||
UNLOCK_LOOKUP;
|
||||
@@ -4033,6 +4055,7 @@ do_lookup(dig_lookup_t *lookup) {
|
||||
lookup->pending = true;
|
||||
query = ISC_LIST_HEAD(lookup->q);
|
||||
if (query != NULL) {
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
if (lookup->tcp_mode)
|
||||
send_tcp_connect(query);
|
||||
else
|
||||
@@ -4180,7 +4203,7 @@ destroy_libs(void) {
|
||||
}
|
||||
|
||||
UNLOCK_LOOKUP;
|
||||
DESTROYLOCK(&lookup_lock);
|
||||
isc_mutex_destroy(&lookup_lock);
|
||||
debug("Removing log context");
|
||||
isc_log_destroy(&lctx);
|
||||
|
||||
|
||||
+1
-6
@@ -112,11 +112,6 @@ Print debugging traces\&. Equivalent to the
|
||||
verbose option\&.
|
||||
.RE
|
||||
.PP
|
||||
\-i
|
||||
.RS 4
|
||||
Obsolete\&. Use the IP6\&.INT domain for reverse lookups of IPv6 addresses as defined in RFC1886 and deprecated in RFC4159\&. The default is to use IP6\&.ARPA as specified in RFC3596\&.
|
||||
.RE
|
||||
.PP
|
||||
\-l
|
||||
.RS 4
|
||||
List zone: The
|
||||
@@ -257,7 +252,7 @@ If
|
||||
\fBhost\fR
|
||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
||||
\fBhost\fR
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, defines the
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, define the
|
||||
\fBIDN_DISABLE\fR
|
||||
environment variable\&. The IDN support is disabled if the variable is set when
|
||||
\fBhost\fR
|
||||
|
||||
+14
-13
@@ -143,7 +143,6 @@ show_usage(void) {
|
||||
" -c specifies query class for non-IN data\n"
|
||||
" -C compares SOA records on authoritative nameservers\n"
|
||||
" -d is equivalent to -v\n"
|
||||
" -i IP6.INT reverse lookups\n"
|
||||
" -l lists all hosts in a domain, using AXFR\n"
|
||||
" -m set memory debugging flag (trace|record|usage)\n"
|
||||
" -N changes the number of dots allowed before root lookup is done\n"
|
||||
@@ -152,6 +151,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"
|
||||
@@ -625,28 +625,29 @@ pre_parse_args(int argc, char **argv) {
|
||||
case 'a': 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();
|
||||
@@ -762,7 +763,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
|
||||
default_lookups = false;
|
||||
break;
|
||||
case 'i':
|
||||
lookup->ip6_int = true;
|
||||
/* deprecated */
|
||||
break;
|
||||
case 'n':
|
||||
/* deprecated */
|
||||
@@ -841,8 +842,8 @@ parse_args(bool is_batchfile, int argc, char **argv) {
|
||||
check_ra = true;
|
||||
|
||||
lookup->pending = false;
|
||||
if (get_reverse(store, sizeof(store), hostname,
|
||||
lookup->ip6_int, true) == ISC_R_SUCCESS) {
|
||||
if (get_reverse(store, sizeof(store), hostname, true)
|
||||
== ISC_R_SUCCESS) {
|
||||
strlcpy(lookup->textname, store, sizeof(lookup->textname));
|
||||
lookup->rdtype = dns_rdatatype_ptr;
|
||||
lookup->rdtypeset = true;
|
||||
|
||||
+1
-12
@@ -47,6 +47,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -179,18 +180,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Obsolete.
|
||||
Use the IP6.INT domain for reverse lookups of IPv6
|
||||
addresses as defined in RFC1886 and deprecated in RFC4159.
|
||||
The default is to use IP6.ARPA as specified in RFC3596.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-l</term>
|
||||
<listitem>
|
||||
|
||||
+1
-10
@@ -138,15 +138,6 @@
|
||||
Equivalent to the <code class="option">-v</code> verbose option.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-i</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Obsolete.
|
||||
Use the IP6.INT domain for reverse lookups of IPv6
|
||||
addresses as defined in RFC1886 and deprecated in RFC4159.
|
||||
The default is to use IP6.ARPA as specified in RFC3596.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-l</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -311,7 +302,7 @@
|
||||
<span class="command"><strong>host</strong></span> appropriately converts character encoding of
|
||||
domain name before sending a request to DNS server or displaying a
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, defines
|
||||
If you'd like to turn off the IDN support for some reason, define
|
||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
||||
The IDN support is disabled if the variable is set when
|
||||
<span class="command"><strong>host</strong></span> runs.
|
||||
|
||||
+12
-11
@@ -26,6 +26,7 @@
|
||||
#include <isc/formatcheck.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/list.h>
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/sockaddr.h>
|
||||
@@ -81,6 +82,11 @@ typedef struct dig_server dig_server_t;
|
||||
typedef ISC_LIST(dig_server_t) dig_serverlist_t;
|
||||
typedef struct dig_searchlist dig_searchlist_t;
|
||||
|
||||
#define DIG_QUERY_MAGIC ISC_MAGIC('D','i','g','q')
|
||||
|
||||
#define DIG_VALID_QUERY(x) ISC_MAGIC_VALID((x), DIG_QUERY_MAGIC)
|
||||
|
||||
|
||||
/*% The dig_lookup structure */
|
||||
struct dig_lookup {
|
||||
bool
|
||||
@@ -103,7 +109,6 @@ struct dig_lookup {
|
||||
trace_root, /*% initial query for either +trace or +nssearch */
|
||||
tcp_mode,
|
||||
tcp_mode_set,
|
||||
ip6_int,
|
||||
comments,
|
||||
stats,
|
||||
section_question,
|
||||
@@ -185,6 +190,7 @@ struct dig_lookup {
|
||||
|
||||
/*% The dig_query structure */
|
||||
struct dig_query {
|
||||
unsigned int magic;
|
||||
dig_lookup_t *lookup;
|
||||
bool waiting_connect,
|
||||
pending_free,
|
||||
@@ -203,15 +209,12 @@ struct dig_query {
|
||||
bool ixfr_axfr;
|
||||
char *servname;
|
||||
char *userarg;
|
||||
isc_bufferlist_t sendlist,
|
||||
recvlist,
|
||||
lengthlist;
|
||||
isc_buffer_t recvbuf,
|
||||
lengthbuf,
|
||||
slbuf;
|
||||
char *recvspace,
|
||||
lengthspace[4],
|
||||
slspace[4];
|
||||
tmpsendbuf,
|
||||
sendbuf;
|
||||
char *recvspace, *tmpsendspace,
|
||||
lengthspace[4];
|
||||
isc_socket_t *sock;
|
||||
ISC_LINK(dig_query_t) link;
|
||||
ISC_LINK(dig_query_t) clink;
|
||||
@@ -219,7 +222,6 @@ struct dig_query {
|
||||
isc_time_t time_sent;
|
||||
isc_time_t time_recv;
|
||||
uint64_t byte_count;
|
||||
isc_buffer_t sendbuf;
|
||||
isc_timer_t *timer;
|
||||
};
|
||||
|
||||
@@ -284,8 +286,7 @@ int
|
||||
getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
|
||||
|
||||
isc_result_t
|
||||
get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
|
||||
bool strict);
|
||||
get_reverse(char *reverse, size_t len, char *value, bool strict);
|
||||
|
||||
ISC_PLATFORM_NORETURN_PRE void
|
||||
fatal(const char *format, ...)
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-7
@@ -772,7 +772,7 @@ addlookup(char *opt) {
|
||||
rdclass = dns_rdataclass_in;
|
||||
}
|
||||
lookup = make_empty_lookup();
|
||||
if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, true)
|
||||
if (get_reverse(store, sizeof(store), opt, true)
|
||||
== ISC_R_SUCCESS) {
|
||||
strlcpy(lookup->textname, store, sizeof(lookup->textname));
|
||||
lookup->rdtype = dns_rdatatype_ptr;
|
||||
@@ -923,12 +923,6 @@ flush_lookup_list(void) {
|
||||
ISC_SOCKCANCEL_ALL);
|
||||
isc_socket_detach(&q->sock);
|
||||
}
|
||||
if (ISC_LINK_LINKED(&q->recvbuf, link))
|
||||
ISC_LIST_DEQUEUE(q->recvlist, &q->recvbuf,
|
||||
link);
|
||||
if (ISC_LINK_LINKED(&q->lengthbuf, link))
|
||||
ISC_LIST_DEQUEUE(q->lengthlist, &q->lengthbuf,
|
||||
link);
|
||||
isc_buffer_invalidate(&q->recvbuf);
|
||||
isc_buffer_invalidate(&q->lengthbuf);
|
||||
qp = q;
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -489,7 +490,8 @@ nslookup -query=hinfo -timeout=10
|
||||
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.
|
||||
<command>nslookup</command> runs or when the standard output is not
|
||||
a tty.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
|
||||
+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)
|
||||
|
||||
@@ -163,8 +163,8 @@ verbose_time(int level, const char *msg, isc_stdtime_t time) {
|
||||
if (verbose < 3) {
|
||||
vbprintf(level, "%s %s\n", msg, timestr);
|
||||
} else {
|
||||
vbprintf(level, "%s %s (%lld)\n",
|
||||
msg, timestr, (long long)time);
|
||||
vbprintf(level, "%s %s (%" PRIu32 ")\n",
|
||||
msg, timestr, time);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
|
||||
ki->algo = dnskey.algorithm;
|
||||
|
||||
dns_rdata_toregion(keyrdata, &r);
|
||||
ki->tag = dst_region_computeid(&r, ki->algo);
|
||||
ki->tag = dst_region_computeid(&r);
|
||||
|
||||
ki->dst = NULL;
|
||||
if (!match_key_dsset(ki, dsset, strictness)) {
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<copyright>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -330,7 +330,7 @@ usage(void) {
|
||||
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");
|
||||
"(SHA-1, SHA-256 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");
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -55,7 +55,7 @@ of the key is specified on the command line\&. This must match the name of the z
|
||||
.RS 4
|
||||
Selects the cryptographic algorithm\&. The value of
|
||||
\fBalgorithm\fR
|
||||
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
|
||||
must be one of RSAMD5, RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
|
||||
.sp
|
||||
If no algorithm is specified, then RSASHA1 will be used by default, unless the
|
||||
\fB\-3\fR
|
||||
@@ -63,9 +63,9 @@ option is specified, in which case NSEC3RSASHA1 will be used instead\&. (If
|
||||
\fB\-3\fR
|
||||
is used and an algorithm is specified, that algorithm will be checked for compatibility with NSEC3\&.)
|
||||
.sp
|
||||
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
|
||||
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 is specified along with the
|
||||
\fB\-3\fR
|
||||
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
|
||||
option, then NSEC3RSASHA1 will be used instead\&.
|
||||
.sp
|
||||
As of BIND 9\&.12\&.0, this option is mandatory except when using the
|
||||
\fB\-S\fR
|
||||
|
||||
@@ -64,7 +64,7 @@ usage(void) {
|
||||
fprintf(stderr, " name: owner of the key\n");
|
||||
fprintf(stderr, "Other options:\n");
|
||||
fprintf(stderr, " -a algorithm: \n"
|
||||
" RSA | RSAMD5 | DH | RSASHA1 |\n"
|
||||
" DH | RSASHA1 |\n"
|
||||
" NSEC3RSASHA1 |\n"
|
||||
" RSASHA256 | RSASHA512 |\n"
|
||||
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
|
||||
@@ -382,22 +382,14 @@ main(int argc, char **argv) {
|
||||
fatal("no algorithm specified");
|
||||
}
|
||||
|
||||
if (strcasecmp(algname, "RSA") == 0) {
|
||||
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
||||
"recommended.\nIf you still wish to "
|
||||
"use RSA (RSAMD5) please specify "
|
||||
"\"-a RSAMD5\"\n");
|
||||
if (freeit != NULL)
|
||||
free(freeit);
|
||||
return (1);
|
||||
} else {
|
||||
r.base = algname;
|
||||
r.length = strlen(algname);
|
||||
ret = dns_secalg_fromtext(&alg, &r);
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
fatal("unknown algorithm %s", algname);
|
||||
if (alg == DST_ALG_DH)
|
||||
options |= DST_TYPE_KEY;
|
||||
r.base = algname;
|
||||
r.length = strlen(algname);
|
||||
ret = dns_secalg_fromtext(&alg, &r);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
fatal("unknown algorithm %s", algname);
|
||||
}
|
||||
if (alg == DST_ALG_DH) {
|
||||
options |= DST_TYPE_KEY;
|
||||
}
|
||||
|
||||
if (use_nsec3) {
|
||||
@@ -639,10 +631,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 ||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -105,7 +106,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
|
||||
<option>algorithm</option> must be one of RSASHA1,
|
||||
NSEC3RSASHA1, RSASHA256, RSASHA512,
|
||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
||||
</para>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<p>
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
|
||||
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||
NSEC3RSASHA1, RSASHA256, RSASHA512,
|
||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
||||
</p>
|
||||
<p>
|
||||
@@ -103,9 +103,9 @@
|
||||
<p>
|
||||
These values are case insensitive. In some cases, abbreviations
|
||||
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
||||
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
|
||||
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
|
||||
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
|
||||
or NSEC3DSA will be used instead.
|
||||
will be used instead.
|
||||
</p>
|
||||
<p>
|
||||
As of BIND 9.12.0, this option is mandatory except when using
|
||||
|
||||
@@ -62,13 +62,13 @@ may be preferable to direct use of
|
||||
.RS 4
|
||||
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
|
||||
\fBalgorithm\fR
|
||||
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
|
||||
must be one of RSAMD5, RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
|
||||
\fB\-T KEY\fR
|
||||
option as well\&.
|
||||
.sp
|
||||
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
|
||||
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 is specified along with the
|
||||
\fB\-3\fR
|
||||
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
|
||||
option, then NSEC3RSASHA1 will be used instead\&.
|
||||
.sp
|
||||
This parameter
|
||||
\fImust\fR
|
||||
@@ -327,21 +327,21 @@ and
|
||||
files are generated for symmetric cryptography algorithms such as HMAC\-MD5, even though the public and private key are equivalent\&.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
To generate a 768\-bit DSA key for the domain
|
||||
To generate an ECDSAP256SHA256 key for the domain
|
||||
\fBexample\&.com\fR, the following command would be issued:
|
||||
.PP
|
||||
\fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example\&.com\fR
|
||||
\fBdnssec\-keygen \-a ECDSAP256SHA256 \-n ZONE example\&.com\fR
|
||||
.PP
|
||||
The command would print a string of the form:
|
||||
.PP
|
||||
\fBKexample\&.com\&.+003+26160\fR
|
||||
\fBKexample\&.com\&.+013+26160\fR
|
||||
.PP
|
||||
In this example,
|
||||
\fBdnssec\-keygen\fR
|
||||
creates the files
|
||||
Kexample\&.com\&.+003+26160\&.key
|
||||
Kexample\&.com\&.+013+26160\&.key
|
||||
and
|
||||
Kexample\&.com\&.+003+26160\&.private\&.
|
||||
Kexample\&.com\&.+013+26160\&.private\&.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec-signzone\fR(8),
|
||||
|
||||
@@ -79,14 +79,12 @@ usage(void) {
|
||||
fprintf(stderr, "Options:\n");
|
||||
fprintf(stderr, " -K <directory>: write keys into directory\n");
|
||||
fprintf(stderr, " -a <algorithm>:\n");
|
||||
fprintf(stderr, " RSA | RSAMD5 | RSASHA1 | NSEC3RSASHA1"
|
||||
" |\n");
|
||||
fprintf(stderr, " RSASHA1 | NSEC3RSASHA1 |\n");
|
||||
fprintf(stderr, " RSASHA256 | RSASHA512 |\n");
|
||||
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
|
||||
fprintf(stderr, " ED25519 | ED448 | DH\n");
|
||||
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
||||
fprintf(stderr, " -b <key size in bits>:\n");
|
||||
fprintf(stderr, " RSAMD5:\t[1024..%d]\n", MAX_RSA);
|
||||
fprintf(stderr, " RSASHA1:\t[1024..%d]\n", MAX_RSA);
|
||||
fprintf(stderr, " NSEC3RSASHA1:\t[1024..%d]\n", MAX_RSA);
|
||||
fprintf(stderr, " RSASHA256:\t[1024..%d]\n", MAX_RSA);
|
||||
@@ -508,23 +506,14 @@ main(int argc, char **argv) {
|
||||
fatal("no algorithm specified");
|
||||
}
|
||||
|
||||
if (strcasecmp(algname, "RSA") == 0) {
|
||||
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
||||
"recommended.\nIf you still wish to "
|
||||
"use RSA (RSAMD5) please specify "
|
||||
"\"-a RSAMD5\"\n");
|
||||
INSIST(freeit == NULL);
|
||||
return (1);
|
||||
} else {
|
||||
r.base = algname;
|
||||
r.length = strlen(algname);
|
||||
ret = dns_secalg_fromtext(&alg, &r);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
fatal("unknown algorithm %s", algname);
|
||||
}
|
||||
if (alg == DST_ALG_DH) {
|
||||
options |= DST_TYPE_KEY;
|
||||
}
|
||||
r.base = algname;
|
||||
r.length = strlen(algname);
|
||||
ret = dns_secalg_fromtext(&alg, &r);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
fatal("unknown algorithm %s", algname);
|
||||
}
|
||||
if (alg == DST_ALG_DH) {
|
||||
options |= DST_TYPE_KEY;
|
||||
}
|
||||
|
||||
if (!dst_algorithm_supported(alg)) {
|
||||
@@ -698,7 +687,6 @@ main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
switch (alg) {
|
||||
case DNS_KEYALG_RSAMD5:
|
||||
case DNS_KEYALG_RSASHA1:
|
||||
case DNS_KEYALG_NSEC3RSASHA1:
|
||||
case DNS_KEYALG_RSASHA256:
|
||||
@@ -780,7 +768,6 @@ main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
switch(alg) {
|
||||
case DNS_KEYALG_RSAMD5:
|
||||
case DNS_KEYALG_RSASHA1:
|
||||
case DNS_KEYALG_NSEC3RSASHA1:
|
||||
case DNS_KEYALG_RSASHA256:
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -122,7 +123,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Selects the cryptographic algorithm. For DNSSEC keys, the value
|
||||
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
|
||||
of <option>algorithm</option> must be one of RSASHA1,
|
||||
NSEC3RSASHA1, RSASHA256, RSASHA512,
|
||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
|
||||
TKEY, the value must be DH (Diffie Hellman); specifying
|
||||
@@ -605,22 +606,22 @@
|
||||
<refsection><info><title>EXAMPLE</title></info>
|
||||
|
||||
<para>
|
||||
To generate a 768-bit DSA key for the domain
|
||||
To generate an ECDSAP256SHA256 key for the domain
|
||||
<userinput>example.com</userinput>, the following command would be
|
||||
issued:
|
||||
</para>
|
||||
<para><userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
|
||||
<para><userinput>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</userinput>
|
||||
</para>
|
||||
<para>
|
||||
The command would print a string of the form:
|
||||
</para>
|
||||
<para><userinput>Kexample.com.+003+26160</userinput>
|
||||
<para><userinput>Kexample.com.+013+26160</userinput>
|
||||
</para>
|
||||
<para>
|
||||
In this example, <command>dnssec-keygen</command> creates
|
||||
the files <filename>Kexample.com.+003+26160.key</filename>
|
||||
the files <filename>Kexample.com.+013+26160.key</filename>
|
||||
and
|
||||
<filename>Kexample.com.+003+26160.private</filename>.
|
||||
<filename>Kexample.com.+013+26160.private</filename>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<p>
|
||||
Selects the cryptographic algorithm. For DNSSEC keys, the value
|
||||
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
|
||||
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||
NSEC3RSASHA1, RSASHA256, RSASHA512,
|
||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
|
||||
TKEY, the value must be DH (Diffie Hellman); specifying
|
||||
his value will automatically set the <code class="option">-T KEY</code>
|
||||
@@ -109,9 +109,9 @@
|
||||
<p>
|
||||
These values are case insensitive. In some cases, abbreviations
|
||||
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
||||
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
|
||||
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
|
||||
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
|
||||
or NSEC3DSA will be used instead.
|
||||
will be used instead.
|
||||
</p>
|
||||
<p>
|
||||
This parameter <span class="emphasis"><em>must</em></span> be specified except
|
||||
@@ -498,22 +498,22 @@
|
||||
<a name="id-1.11"></a><h2>EXAMPLE</h2>
|
||||
|
||||
<p>
|
||||
To generate a 768-bit DSA key for the domain
|
||||
To generate an ECDSAP256SHA256 key for the domain
|
||||
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||
issued:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE example.com</code></strong>
|
||||
<p><strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
The command would print a string of the form:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||
<p><strong class="userinput"><code>Kexample.com.+013+26160</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
In this example, <span class="command"><strong>dnssec-keygen</strong></span> creates
|
||||
the files <code class="filename">Kexample.com.+003+26160.key</code>
|
||||
the files <code class="filename">Kexample.com.+013+26160.key</code>
|
||||
and
|
||||
<code class="filename">Kexample.com.+003+26160.private</code>.
|
||||
<code class="filename">Kexample.com.+013+26160.private</code>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ main(int argc, char **argv) {
|
||||
* Remove old key file, if told to (and if
|
||||
* it isn't the same as the new file)
|
||||
*/
|
||||
if (removefile && dst_key_alg(key) != DST_ALG_RSAMD5) {
|
||||
if (removefile) {
|
||||
isc_buffer_init(&buf, oldname, sizeof(oldname));
|
||||
dst_key_setflags(key, flags & ~DNS_KEYFLAG_REVOKE);
|
||||
dst_key_buildfilename(key, DST_TYPE_PRIVATE, dir, &buf);
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -415,9 +415,9 @@ Specify which keys should be used to sign the zone\&. If no keys are specified,
|
||||
.PP
|
||||
The following command signs the
|
||||
\fBexample\&.com\fR
|
||||
zone with the DSA key generated by
|
||||
zone with the ECDSAP256SHA256 key generated by key generated by
|
||||
\fBdnssec\-keygen\fR
|
||||
(Kexample\&.com\&.+003+17247)\&. Because the
|
||||
(Kexample\&.com\&.+013+17247)\&. Because the
|
||||
\fB\-S\fR
|
||||
option is not being used, the zone\*(Aqs keys must be in the master file (db\&.example\&.com)\&. This invocation looks for
|
||||
dsset
|
||||
@@ -428,7 +428,7 @@ files, in the current directory, so that DS records can be imported from them (\
|
||||
.\}
|
||||
.nf
|
||||
% dnssec\-signzone \-g \-o example\&.com db\&.example\&.com \e
|
||||
Kexample\&.com\&.+003+17247
|
||||
Kexample\&.com\&.+013+17247
|
||||
db\&.example\&.com\&.signed
|
||||
%
|
||||
.fi
|
||||
|
||||
@@ -533,8 +533,6 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
|
||||
arraysize += dns_rdataset_count(&sigset);
|
||||
wassignedby = isc_mem_get(mctx, arraysize * sizeof(bool));
|
||||
nowsignedby = isc_mem_get(mctx, arraysize * sizeof(bool));
|
||||
if (wassignedby == NULL || nowsignedby == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
for (i = 0; i < arraysize; i++)
|
||||
wassignedby[i] = nowsignedby[i] = false;
|
||||
@@ -3876,9 +3874,11 @@ main(int argc, char *argv[]) {
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
RUNTIME_CHECK(isc_mutex_init(&namelock) == ISC_R_SUCCESS);
|
||||
if (printstats)
|
||||
RUNTIME_CHECK(isc_mutex_init(&statslock) == ISC_R_SUCCESS);
|
||||
isc_mutex_init(&namelock);
|
||||
|
||||
if (printstats) {
|
||||
isc_mutex_init(&statslock);
|
||||
}
|
||||
|
||||
presign();
|
||||
TIME_NOW(&sign_start);
|
||||
@@ -3936,9 +3936,9 @@ main(int argc, char *argv[]) {
|
||||
check_result(result, "dns_master_dumptostream3");
|
||||
}
|
||||
|
||||
DESTROYLOCK(&namelock);
|
||||
isc_mutex_destroy(&namelock);
|
||||
if (printstats)
|
||||
DESTROYLOCK(&statslock);
|
||||
isc_mutex_destroy(&statslock);
|
||||
|
||||
if (!output_stdout) {
|
||||
result = isc_stdio_close(outfp);
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -787,15 +788,16 @@
|
||||
|
||||
<para>
|
||||
The following command signs the <userinput>example.com</userinput>
|
||||
zone with the DSA key generated by <command>dnssec-keygen</command>
|
||||
(Kexample.com.+003+17247). Because the <command>-S</command> option
|
||||
is not being used, the zone's keys must be in the master file
|
||||
zone with the ECDSAP256SHA256 key generated by key generated by
|
||||
<command>dnssec-keygen</command> (Kexample.com.+013+17247).
|
||||
Because the <command>-S</command> option is not being used,
|
||||
the zone's keys must be in the master file
|
||||
(<filename>db.example.com</filename>). This invocation looks
|
||||
for <filename>dsset</filename> files, in the current directory,
|
||||
so that DS records can be imported from them (<command>-g</command>).
|
||||
</para>
|
||||
<programlisting>% dnssec-signzone -g -o example.com db.example.com \
|
||||
Kexample.com.+003+17247
|
||||
Kexample.com.+013+17247
|
||||
db.example.com.signed
|
||||
%</programlisting>
|
||||
<para>
|
||||
|
||||
@@ -624,15 +624,16 @@
|
||||
|
||||
<p>
|
||||
The following command signs the <strong class="userinput"><code>example.com</code></strong>
|
||||
zone with the DSA key generated by <span class="command"><strong>dnssec-keygen</strong></span>
|
||||
(Kexample.com.+003+17247). Because the <span class="command"><strong>-S</strong></span> option
|
||||
is not being used, the zone's keys must be in the master file
|
||||
zone with the ECDSAP256SHA256 key generated by key generated by
|
||||
<span class="command"><strong>dnssec-keygen</strong></span> (Kexample.com.+013+17247).
|
||||
Because the <span class="command"><strong>-S</strong></span> option is not being used,
|
||||
the zone's keys must be in the master file
|
||||
(<code class="filename">db.example.com</code>). This invocation looks
|
||||
for <code class="filename">dsset</code> files, in the current directory,
|
||||
so that DS records can be imported from them (<span class="command"><strong>-g</strong></span>).
|
||||
</p>
|
||||
<pre class="programlisting">% dnssec-signzone -g -o example.com db.example.com \
|
||||
Kexample.com.+003+17247
|
||||
Kexample.com.+013+17247
|
||||
db.example.com.signed
|
||||
%</pre>
|
||||
<p>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
+5
-4
@@ -154,10 +154,7 @@ options {\n\
|
||||
# fetch-glue <obsolete>;\n\
|
||||
fetch-quota-params 100 0.1 0.3 0.7;\n\
|
||||
fetches-per-server 0;\n\
|
||||
fetches-per-zone 0;\n\
|
||||
filter-aaaa-on-v4 no;\n\
|
||||
filter-aaaa-on-v6 no;\n\
|
||||
filter-aaaa { any; };\n"
|
||||
fetches-per-zone 0;\n"
|
||||
#ifdef HAVE_GEOIP
|
||||
" geoip-use-ecs yes;\n"
|
||||
#endif
|
||||
@@ -174,6 +171,8 @@ options {\n\
|
||||
max-recursion-queries 75;\n\
|
||||
max-stale-ttl 604800; /* 1 week */\n\
|
||||
message-compression yes;\n\
|
||||
min-ncache-ttl 0; /* 0 hours */\n\
|
||||
min-cache-ttl 0; /* 0 seconds */\n\
|
||||
# min-roots <obsolete>;\n\
|
||||
minimal-any false;\n\
|
||||
minimal-responses no-auth-recursive;\n\
|
||||
@@ -457,6 +456,7 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
|
||||
ztype = dns_zone_redirect;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
return (ztype);
|
||||
}
|
||||
@@ -1029,6 +1029,7 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
|
||||
case hmacsha512: *name = dns_tsig_hmacsha512_name; break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
if (typep != NULL)
|
||||
|
||||
+71
-69
@@ -152,16 +152,11 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
|
||||
"received control channel command '%s'",
|
||||
cmdline);
|
||||
|
||||
if (command_compare(command, NAMED_COMMAND_RELOAD)) {
|
||||
result = named_server_reloadcommand(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_RECONFIG)) {
|
||||
result = named_server_reconfigcommand(named_g_server);
|
||||
} else if (command_compare(command, NAMED_COMMAND_REFRESH)) {
|
||||
result = named_server_refreshcommand(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_RETRANSFER)) {
|
||||
result = named_server_retransfercommand(named_g_server,
|
||||
lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_HALT)) {
|
||||
/*
|
||||
* After the lengthy "halt" and "stop", the commands are
|
||||
* handled in alphabetical order of the NAMED_COMMAND_ macros.
|
||||
*/
|
||||
if (command_compare(command, NAMED_COMMAND_HALT)) {
|
||||
#ifdef HAVE_LIBSCF
|
||||
/*
|
||||
* If we are managed by smf(5), AND in chroot, then
|
||||
@@ -206,83 +201,90 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
|
||||
named_os_shutdownmsg(cmdline, *text);
|
||||
isc_app_shutdown();
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NAMED_COMMAND_DUMPSTATS)) {
|
||||
result = named_server_dumpstats(named_g_server);
|
||||
} else if (command_compare(command, NAMED_COMMAND_QUERYLOG)) {
|
||||
result = named_server_togglequerylog(named_g_server, lex);
|
||||
} else if (command_compare(command, NAMED_COMMAND_ADDZONE) ||
|
||||
command_compare(command, NAMED_COMMAND_MODZONE)) {
|
||||
result = named_server_changezone(named_g_server, cmdline, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_DELZONE)) {
|
||||
result = named_server_delzone(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_DNSTAP) ||
|
||||
command_compare(command, NAMED_COMMAND_DNSTAPREOPEN)) {
|
||||
result = named_server_dnstap(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_DUMPDB)) {
|
||||
named_server_dumpdb(named_g_server, lex, text);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NAMED_COMMAND_SECROOTS)) {
|
||||
result = named_server_dumpsecroots(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TRACE)) {
|
||||
result = named_server_setdebuglevel(named_g_server, lex);
|
||||
} else if (command_compare(command, NAMED_COMMAND_NOTRACE)) {
|
||||
named_g_debuglevel = 0;
|
||||
isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NAMED_COMMAND_DUMPSTATS)) {
|
||||
result = named_server_dumpstats(named_g_server);
|
||||
} else if (command_compare(command, NAMED_COMMAND_FLUSH)) {
|
||||
result = named_server_flushcache(named_g_server, lex);
|
||||
} else if (command_compare(command, NAMED_COMMAND_FLUSHNAME)) {
|
||||
result = named_server_flushnode(named_g_server, lex, false);
|
||||
} else if (command_compare(command, NAMED_COMMAND_FLUSHTREE)) {
|
||||
result = named_server_flushnode(named_g_server, lex, true);
|
||||
} else if (command_compare(command, NAMED_COMMAND_STATUS)) {
|
||||
result = named_server_status(named_g_server, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TSIGLIST)) {
|
||||
result = named_server_tsiglist(named_g_server, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TSIGDELETE)) {
|
||||
result = named_server_tsigdelete(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_FREEZE)) {
|
||||
result = named_server_freeze(named_g_server, true, lex,
|
||||
text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_UNFREEZE) ||
|
||||
command_compare(command, NAMED_COMMAND_THAW)) {
|
||||
result = named_server_freeze(named_g_server, false, lex,
|
||||
text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SCAN)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
named_server_scan_interfaces(named_g_server);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SYNC)) {
|
||||
result = named_server_sync(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_RECURSING)) {
|
||||
result = named_server_dumprecursing(named_g_server);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TIMERPOKE)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
isc_timermgr_poke(named_g_timermgr);
|
||||
} else if (command_compare(command, NAMED_COMMAND_NULL)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
result = named_server_freeze(named_g_server, true, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_LOADKEYS) ||
|
||||
command_compare(command, NAMED_COMMAND_SIGN)) {
|
||||
result = named_server_rekey(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_MKEYS)) {
|
||||
result = named_server_mkeys(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_NOTIFY)) {
|
||||
result = named_server_notifycommand(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_VALIDATION)) {
|
||||
result = named_server_validation(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SIGN) ||
|
||||
command_compare(command, NAMED_COMMAND_LOADKEYS)) {
|
||||
result = named_server_rekey(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_ADDZONE) ||
|
||||
command_compare(command, NAMED_COMMAND_MODZONE)) {
|
||||
result = named_server_changezone(named_g_server, cmdline, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_DELZONE)) {
|
||||
result = named_server_delzone(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_NOTRACE)) {
|
||||
named_g_debuglevel = 0;
|
||||
isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NAMED_COMMAND_NTA)) {
|
||||
result = named_server_nta(named_g_server, lex, readonly, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_NULL)) {
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NAMED_COMMAND_QUERYLOG)) {
|
||||
result = named_server_togglequerylog(named_g_server, lex);
|
||||
} else if (command_compare(command, NAMED_COMMAND_RECONFIG)) {
|
||||
result = named_server_reconfigcommand(named_g_server);
|
||||
} else if (command_compare(command, NAMED_COMMAND_RECURSING)) {
|
||||
result = named_server_dumprecursing(named_g_server);
|
||||
} else if (command_compare(command, NAMED_COMMAND_REFRESH)) {
|
||||
result = named_server_refreshcommand(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_RELOAD)) {
|
||||
result = named_server_reloadcommand(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_RETRANSFER)) {
|
||||
result = named_server_retransfercommand(named_g_server,
|
||||
lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SCAN)) {
|
||||
named_server_scan_interfaces(named_g_server);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NAMED_COMMAND_SECROOTS)) {
|
||||
result = named_server_dumpsecroots(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SERVESTALE)) {
|
||||
result = named_server_servestale(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SHOWZONE)) {
|
||||
result = named_server_showzone(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SIGNING)) {
|
||||
result = named_server_signing(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_ZONESTATUS)) {
|
||||
result = named_server_zonestatus(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_NTA)) {
|
||||
result = named_server_nta(named_g_server, lex, readonly, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TESTGEN)) {
|
||||
result = named_server_testgen(lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_MKEYS)) {
|
||||
result = named_server_mkeys(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_DNSTAP) ||
|
||||
command_compare(command, NAMED_COMMAND_DNSTAPREOPEN)) {
|
||||
result = named_server_dnstap(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_STATUS)) {
|
||||
result = named_server_status(named_g_server, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SYNC)) {
|
||||
result = named_server_sync(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TCPTIMEOUTS)) {
|
||||
result = named_server_tcptimeouts(lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_SERVESTALE)) {
|
||||
result = named_server_servestale(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TESTGEN)) {
|
||||
result = named_server_testgen(lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_THAW) ||
|
||||
command_compare(command, NAMED_COMMAND_UNFREEZE)) {
|
||||
result = named_server_freeze(named_g_server, false, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TIMERPOKE)) {
|
||||
isc_timermgr_poke(named_g_timermgr);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NAMED_COMMAND_TRACE)) {
|
||||
result = named_server_setdebuglevel(named_g_server, lex);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TSIGDELETE)) {
|
||||
result = named_server_tsigdelete(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_TSIGLIST)) {
|
||||
result = named_server_tsiglist(named_g_server, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_VALIDATION)) {
|
||||
result = named_server_validation(named_g_server, lex, text);
|
||||
} else if (command_compare(command, NAMED_COMMAND_ZONESTATUS)) {
|
||||
result = named_server_zonestatus(named_g_server, lex, text);
|
||||
} else {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_CONTROL, ISC_LOG_WARNING,
|
||||
|
||||
@@ -78,6 +78,7 @@ struct named_server {
|
||||
|
||||
isc_mutex_t reload_event_lock;
|
||||
isc_event_t * reload_event;
|
||||
bool reload_in_progress;
|
||||
|
||||
bool flushonshutdown;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
+19
-15
@@ -793,10 +793,7 @@ create_managers(void) {
|
||||
named_g_udpdisp = 1;
|
||||
#else
|
||||
if (named_g_udpdisp == 0) {
|
||||
if (named_g_cpus_detected == 1)
|
||||
named_g_udpdisp = 1;
|
||||
else
|
||||
named_g_udpdisp = named_g_cpus_detected - 1;
|
||||
named_g_udpdisp = named_g_cpus_detected;
|
||||
}
|
||||
if (named_g_udpdisp > named_g_cpus)
|
||||
named_g_udpdisp = named_g_cpus;
|
||||
@@ -824,7 +821,7 @@ create_managers(void) {
|
||||
}
|
||||
|
||||
result = isc_socketmgr_create2(named_g_mctx, &named_g_socketmgr,
|
||||
maxsocks);
|
||||
maxsocks, named_g_cpus);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_socketmgr_create() failed: %s",
|
||||
@@ -1068,14 +1065,20 @@ setup(void) {
|
||||
/*
|
||||
* Get the initial resource limits.
|
||||
*/
|
||||
(void)isc_resource_getlimit(isc_resource_stacksize,
|
||||
&named_g_initstacksize);
|
||||
(void)isc_resource_getlimit(isc_resource_datasize,
|
||||
&named_g_initdatasize);
|
||||
(void)isc_resource_getlimit(isc_resource_coresize,
|
||||
&named_g_initcoresize);
|
||||
(void)isc_resource_getlimit(isc_resource_openfiles,
|
||||
&named_g_initopenfiles);
|
||||
#ifndef WIN32
|
||||
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_stacksize,
|
||||
&named_g_initstacksize)
|
||||
== ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_datasize,
|
||||
&named_g_initdatasize)
|
||||
== ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_coresize,
|
||||
&named_g_initcoresize)
|
||||
== ISC_R_SUCCESS);
|
||||
#endif
|
||||
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_openfiles,
|
||||
&named_g_initopenfiles)
|
||||
== ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* System resources cannot effectively be tuned on some systems.
|
||||
@@ -1083,8 +1086,9 @@ setup(void) {
|
||||
*/
|
||||
old_openfiles = named_g_initopenfiles;
|
||||
named_os_adjustnofile();
|
||||
(void)isc_resource_getlimit(isc_resource_openfiles,
|
||||
&named_g_initopenfiles);
|
||||
RUNTIME_CHECK(isc_resource_getlimit(isc_resource_openfiles,
|
||||
&named_g_initopenfiles)
|
||||
== ISC_R_SUCCESS);
|
||||
if (old_openfiles != named_g_initopenfiles) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
|
||||
|
||||
+17
-13
@@ -10,12 +10,12 @@
|
||||
.\" Title: named.conf
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2018-06-21
|
||||
.\" Date: 2018-10-23
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "NAMED\&.CONF" "5" "2018\-06\-21" "ISC" "BIND9"
|
||||
.TH "NAMED\&.CONF" "5" "2018\-10\-23" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -199,6 +199,7 @@ options {
|
||||
] [ dscp \fIinteger\fR ];
|
||||
alt\-transfer\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR |
|
||||
* ) ] [ dscp \fIinteger\fR ];
|
||||
answer\-cookie \fIboolean\fR;
|
||||
attach\-cache \fIstring\fR;
|
||||
auth\-nxdomain \fIboolean\fR; // default changed
|
||||
auto\-dnssec ( allow | maintain | off );
|
||||
@@ -264,8 +265,8 @@ options {
|
||||
dnssec\-secure\-to\-insecure \fIboolean\fR;
|
||||
dnssec\-update\-mode ( maintain | no\-resign );
|
||||
dnssec\-validation ( yes | no | auto );
|
||||
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |
|
||||
response ) ]; \&.\&.\&. };
|
||||
dnstap { ( all | auth | client | forwarder | resolver | update ) [
|
||||
( query | response ) ]; \&.\&.\&. };
|
||||
dnstap\-identity ( \fIquoted_string\fR | none | hostname );
|
||||
dnstap\-output ( file | unix ) \fIquoted_string\fR [ size ( unlimited |
|
||||
\fIsize\fR ) ] [ versions ( unlimited | \fIinteger\fR ) ] [ suffix (
|
||||
@@ -343,6 +344,8 @@ options {
|
||||
memstatistics \fIboolean\fR;
|
||||
memstatistics\-file \fIquoted_string\fR;
|
||||
message\-compression \fIboolean\fR;
|
||||
min\-cache\-ttl \fIttlval\fR;
|
||||
min\-ncache\-ttl \fIttlval\fR;
|
||||
min\-refresh\-time \fIinteger\fR;
|
||||
min\-retry\-time \fIinteger\fR;
|
||||
minimal\-any \fIboolean\fR;
|
||||
@@ -632,8 +635,8 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
dnssec\-secure\-to\-insecure \fIboolean\fR;
|
||||
dnssec\-update\-mode ( maintain | no\-resign );
|
||||
dnssec\-validation ( yes | no | auto );
|
||||
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |
|
||||
response ) ]; \&.\&.\&. };
|
||||
dnstap { ( all | auth | client | forwarder | resolver | update ) [
|
||||
( query | response ) ]; \&.\&.\&. };
|
||||
dual\-stack\-servers [ port \fIinteger\fR ] { ( \fIquoted_string\fR [ port
|
||||
\fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv4_address\fR [ port
|
||||
\fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv6_address\fR [ port
|
||||
@@ -914,10 +917,10 @@ view \fIstring\fR [ \fIclass\fR ] {
|
||||
static\-stub | stub );
|
||||
update\-check\-ksk \fIboolean\fR;
|
||||
update\-policy ( local | { ( deny | grant ) \fIstring\fR (
|
||||
6to4\-self | external | krb5\-self | krb5\-subdomain |
|
||||
ms\-self | ms\-subdomain | name | self | selfsub |
|
||||
selfwild | subdomain | tcp\-self | wildcard | zonesub )
|
||||
[ \fIstring\fR ] \fIrrtypelist\fR; \&.\&.\&. };
|
||||
6to4\-self | external | krb5\-self | krb5\-selfsub |
|
||||
krb5\-subdomain | ms\-self | ms\-selfsub | ms\-subdomain |
|
||||
name | self | selfsub | selfwild | subdomain | tcp\-self
|
||||
| wildcard | zonesub ) [ \fIstring\fR ] \fIrrtypelist\fR; \&.\&.\&. };
|
||||
use\-alt\-transfer\-source \fIboolean\fR;
|
||||
zero\-no\-soa\-ttl \fIboolean\fR;
|
||||
zone\-statistics ( full | terse | none | \fIboolean\fR );
|
||||
@@ -1020,9 +1023,10 @@ zone \fIstring\fR [ \fIclass\fR ] {
|
||||
stub );
|
||||
update\-check\-ksk \fIboolean\fR;
|
||||
update\-policy ( local | { ( deny | grant ) \fIstring\fR ( 6to4\-self |
|
||||
external | krb5\-self | krb5\-subdomain | ms\-self | ms\-subdomain
|
||||
| name | self | selfsub | selfwild | subdomain | tcp\-self |
|
||||
wildcard | zonesub ) [ \fIstring\fR ] \fIrrtypelist\fR; \&.\&.\&. };
|
||||
external | krb5\-self | krb5\-selfsub | krb5\-subdomain | ms\-self
|
||||
| ms\-selfsub | ms\-subdomain | name | self | selfsub | selfwild
|
||||
| subdomain | tcp\-self | wildcard | zonesub ) [ \fIstring\fR ]
|
||||
\fIrrtypelist\fR; \&.\&.\&. };
|
||||
use\-alt\-transfer\-source \fIboolean\fR;
|
||||
zero\-no\-soa\-ttl \fIboolean\fR;
|
||||
zone\-statistics ( full | terse | none | \fIboolean\fR );
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -337,6 +338,8 @@ options {
|
||||
memstatistics <replaceable>boolean</replaceable>;
|
||||
memstatistics-file <replaceable>quoted_string</replaceable>;
|
||||
message-compression <replaceable>boolean</replaceable>;
|
||||
min-cache-ttl <replaceable>ttlval</replaceable>;
|
||||
min-ncache-ttl <replaceable>ttlval</replaceable>;
|
||||
min-refresh-time <replaceable>integer</replaceable>;
|
||||
min-retry-time <replaceable>integer</replaceable>;
|
||||
minimal-any <replaceable>boolean</replaceable>;
|
||||
|
||||
+15
-11
@@ -180,6 +180,7 @@ options
|
||||
] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
|
||||
alt-transfer-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> |<br>
|
||||
* ) ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
|
||||
answer-cookie <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
attach-cache <em class="replaceable"><code>string</code></em>;<br>
|
||||
auth-nxdomain <em class="replaceable"><code>boolean</code></em>; // default changed<br>
|
||||
auto-dnssec ( allow | maintain | off );<br>
|
||||
@@ -245,8 +246,8 @@ options
|
||||
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-update-mode ( maintain | no-resign );<br>
|
||||
dnssec-validation ( yes | no | auto );<br>
|
||||
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |<br>
|
||||
response ) ]; ... };<br>
|
||||
dnstap { ( all | auth | client | forwarder | resolver | update ) [<br>
|
||||
( query | response ) ]; ... };<br>
|
||||
dnstap-identity ( <em class="replaceable"><code>quoted_string</code></em> | none | hostname );<br>
|
||||
dnstap-output ( file | unix ) <em class="replaceable"><code>quoted_string</code></em> [ size ( unlimited |<br>
|
||||
<em class="replaceable"><code>size</code></em> ) ] [ versions ( unlimited | <em class="replaceable"><code>integer</code></em> ) ] [ suffix (<br>
|
||||
@@ -324,6 +325,8 @@ options
|
||||
memstatistics <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
memstatistics-file <em class="replaceable"><code>quoted_string</code></em>;<br>
|
||||
message-compression <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
min-cache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
|
||||
min-ncache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
|
||||
min-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
|
||||
min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
|
||||
minimal-any <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
@@ -601,8 +604,8 @@ view
|
||||
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
dnssec-update-mode ( maintain | no-resign );<br>
|
||||
dnssec-validation ( yes | no | auto );<br>
|
||||
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |<br>
|
||||
response ) ]; ... };<br>
|
||||
dnstap { ( all | auth | client | forwarder | resolver | update ) [<br>
|
||||
( query | response ) ]; ... };<br>
|
||||
dual-stack-servers [ port <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>quoted_string</code></em> [ port<br>
|
||||
<em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
|
||||
<em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port<br>
|
||||
@@ -883,10 +886,10 @@ view
|
||||
static-stub | stub );<br>
|
||||
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
update-policy ( local | { ( deny | grant ) <em class="replaceable"><code>string</code></em> (<br>
|
||||
6to4-self | external | krb5-self | krb5-subdomain |<br>
|
||||
ms-self | ms-subdomain | name | self | selfsub |<br>
|
||||
selfwild | subdomain | tcp-self | wildcard | zonesub )<br>
|
||||
[ <em class="replaceable"><code>string</code></em> ] <em class="replaceable"><code>rrtypelist</code></em>; ... };<br>
|
||||
6to4-self | external | krb5-self | krb5-selfsub |<br>
|
||||
krb5-subdomain | ms-self | ms-selfsub | ms-subdomain |<br>
|
||||
name | self | selfsub | selfwild | subdomain | tcp-self<br>
|
||||
| wildcard | zonesub ) [ <em class="replaceable"><code>string</code></em> ] <em class="replaceable"><code>rrtypelist</code></em>; ... };<br>
|
||||
use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
zone-statistics ( full | terse | none | <em class="replaceable"><code>boolean</code></em> );<br>
|
||||
@@ -986,9 +989,10 @@ zone
|
||||
stub );<br>
|
||||
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
update-policy ( local | { ( deny | grant ) <em class="replaceable"><code>string</code></em> ( 6to4-self |<br>
|
||||
external | krb5-self | krb5-subdomain | ms-self | ms-subdomain<br>
|
||||
| name | self | selfsub | selfwild | subdomain | tcp-self |<br>
|
||||
wildcard | zonesub ) [ <em class="replaceable"><code>string</code></em> ] <em class="replaceable"><code>rrtypelist</code></em>; ... };<br>
|
||||
external | krb5-self | krb5-selfsub | krb5-subdomain | ms-self<br>
|
||||
| ms-selfsub | ms-subdomain | name | self | selfsub | selfwild<br>
|
||||
| subdomain | tcp-self | wildcard | zonesub ) [ <em class="replaceable"><code>string</code></em> ]<br>
|
||||
<em class="replaceable"><code>rrtypelist</code></em>; ... };<br>
|
||||
use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
|
||||
zone-statistics ( full | terse | none | <em class="replaceable"><code>boolean</code></em> );<br>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
+318
-159
@@ -102,6 +102,7 @@
|
||||
#include <dst/result.h>
|
||||
|
||||
#include <ns/client.h>
|
||||
#include <ns/hooks.h>
|
||||
#include <ns/listenlist.h>
|
||||
#include <ns/interfacemgr.h>
|
||||
|
||||
@@ -305,6 +306,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.
|
||||
*/
|
||||
@@ -769,8 +777,7 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
|
||||
keystruct.datalen = r.length;
|
||||
keystruct.data = r.base;
|
||||
|
||||
if ((keystruct.algorithm == DST_ALG_RSASHA1 ||
|
||||
keystruct.algorithm == DST_ALG_RSAMD5) &&
|
||||
if ((keystruct.algorithm == DST_ALG_RSASHA1) &&
|
||||
r.length > 1 && r.base[0] == 1 && r.base[1] == 3)
|
||||
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
|
||||
"%s key '%s' has a weak exponent",
|
||||
@@ -1145,6 +1152,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
sa = *(cfg_obj_assockaddr(obj));
|
||||
@@ -1166,6 +1174,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);
|
||||
@@ -1273,20 +1282,22 @@ 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 = DNS_RDATASETATTR_CYCLIC;
|
||||
#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 = DNS_RDATASETATTR_CYCLIC;
|
||||
else if (!strcasecmp(str, "none"))
|
||||
} else if (!strcasecmp(str, "none")) {
|
||||
mode = DNS_RDATASETATTR_NONE;
|
||||
else
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
/*
|
||||
* "*" should match everything including the root (BIND 8 compat).
|
||||
@@ -1418,14 +1429,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;
|
||||
@@ -2276,21 +2289,18 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
if (zone_element == NULL)
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
#ifdef ENABLE_RPZ_NSIP
|
||||
nsip_enabled = true;
|
||||
nsdname_enabled = true;
|
||||
#else
|
||||
nsip_enabled = false;
|
||||
nsdname_enabled = false;
|
||||
#endif
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "nsip-enable");
|
||||
if (!cfg_obj_isvoid(sub_obj))
|
||||
if (!cfg_obj_isvoid(sub_obj)) {
|
||||
nsip_enabled = cfg_obj_asboolean(sub_obj);
|
||||
}
|
||||
nsip_on = nsip_enabled ? DNS_RPZ_ALL_ZBITS : 0;
|
||||
|
||||
nsdname_enabled = true;
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "nsdname-enable");
|
||||
if (!cfg_obj_isvoid(sub_obj))
|
||||
if (!cfg_obj_isvoid(sub_obj)) {
|
||||
nsdname_enabled = cfg_obj_asboolean(sub_obj);
|
||||
}
|
||||
nsdname_on = nsdname_enabled ? DNS_RPZ_ALL_ZBITS : 0;
|
||||
|
||||
/*
|
||||
@@ -2538,7 +2548,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(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_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(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: error \"%s\" while trying to "
|
||||
@@ -2718,7 +2736,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:
|
||||
@@ -3625,6 +3643,35 @@ create_mapped_acl(void) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DLOPEN
|
||||
/*%
|
||||
* A callback for the cfg_pluginlist_foreach() call in configure_view() below.
|
||||
* If registering any plugin fails, registering subsequent ones is not
|
||||
* attempted.
|
||||
*/
|
||||
static isc_result_t
|
||||
register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
|
||||
const char *plugin_path, const char *parameters,
|
||||
void *callback_data)
|
||||
{
|
||||
dns_view_t *view = callback_data;
|
||||
isc_result_t result;
|
||||
|
||||
result = ns_plugin_register(plugin_path, parameters, config,
|
||||
cfg_obj_file(obj), cfg_obj_line(obj),
|
||||
named_g_mctx, named_g_lctx,
|
||||
named_g_aclconfctx, view);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"%s: plugin configuration failed: %s",
|
||||
plugin_path, isc_result_totext(result));
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Configure 'view' according to 'vconfig', taking defaults from 'config'
|
||||
* where values are missing in 'vconfig'.
|
||||
@@ -3653,7 +3700,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
const cfg_obj_t *dlvobj = NULL;
|
||||
unsigned int dlzargc;
|
||||
char **dlzargv;
|
||||
const cfg_obj_t *dyndb_list;
|
||||
const cfg_obj_t *dyndb_list, *plugin_list;
|
||||
const cfg_obj_t *disabled;
|
||||
const cfg_obj_t *obj, *obj2;
|
||||
const cfg_listelt_t *element;
|
||||
@@ -3943,8 +3990,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 = named_config_get(maps, "zero-no-soa-ttl-cache", &obj);
|
||||
@@ -4109,8 +4158,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
result = named_config_get(maps, "max-ncache-ttl", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
view->maxncachettl = cfg_obj_asuint32(obj);
|
||||
if (view->maxncachettl > 7 * 24 * 3600)
|
||||
view->maxncachettl = 7 * 24 * 3600;
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "min-cache-ttl", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
view->mincachettl = cfg_obj_asuint32(obj);
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "min-ncache-ttl", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
view->minncachettl = cfg_obj_asuint32(obj);
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "synth-from-dnssec", &obj);
|
||||
@@ -4356,14 +4413,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);
|
||||
@@ -4709,20 +4768,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 = named_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 = named_config_get(maps, "trust-anchor-telemetry", &obj);
|
||||
@@ -4929,16 +4992,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
&view->sortlist));
|
||||
|
||||
/*
|
||||
* Configure default allow-notify, allow-update
|
||||
* and allow-update-forwarding ACLs, so they can be
|
||||
* inherited by zones. (Note these cannot be set at
|
||||
* Configure default allow-update and allow-update-forwarding ACLs,
|
||||
* so they can be inherited by zones. (Note these cannot be set at
|
||||
* options/view level.)
|
||||
*/
|
||||
if (view->notifyacl == NULL) {
|
||||
CHECK(configure_view_acl(vconfig, config, named_g_config,
|
||||
"allow-notify", NULL, actx,
|
||||
named_g_mctx, &view->notifyacl));
|
||||
}
|
||||
if (view->updateacl == NULL) {
|
||||
CHECK(configure_view_acl(NULL, NULL, named_g_config,
|
||||
"allow-update", NULL, actx,
|
||||
@@ -4951,14 +5008,19 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
}
|
||||
|
||||
/*
|
||||
* Configure default allow-transer ACL so it can be inherited
|
||||
* by zones. (Note this *can* be set at options or view level.)
|
||||
* Configure default allow-transfer and allow-notify ACLs so they
|
||||
* can be inherited by zones.
|
||||
*/
|
||||
if (view->transferacl == NULL) {
|
||||
CHECK(configure_view_acl(vconfig, config, named_g_config,
|
||||
"allow-transfer", NULL, actx,
|
||||
named_g_mctx, &view->transferacl));
|
||||
}
|
||||
if (view->notifyacl == NULL) {
|
||||
CHECK(configure_view_acl(vconfig, config, named_g_config,
|
||||
"allow-notify", NULL, actx,
|
||||
named_g_mctx, &view->notifyacl));
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "provide-ixfr", &obj);
|
||||
@@ -5036,55 +5098,21 @@ 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);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "filter-aaaa-on-v4", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
if (cfg_obj_isboolean(obj)) {
|
||||
if (cfg_obj_asboolean(obj))
|
||||
view->v4_aaaa = dns_aaaa_filter;
|
||||
else
|
||||
view->v4_aaaa = dns_aaaa_ok;
|
||||
} else {
|
||||
const char *v4_aaaastr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(v4_aaaastr, "break-dnssec") == 0)
|
||||
view->v4_aaaa = dns_aaaa_break_dnssec;
|
||||
else
|
||||
INSIST(0);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "filter-aaaa-on-v6", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
if (cfg_obj_isboolean(obj)) {
|
||||
if (cfg_obj_asboolean(obj))
|
||||
view->v6_aaaa = dns_aaaa_filter;
|
||||
else
|
||||
view->v6_aaaa = dns_aaaa_ok;
|
||||
} else {
|
||||
const char *v6_aaaastr = cfg_obj_asstring(obj);
|
||||
if (strcasecmp(v6_aaaastr, "break-dnssec") == 0)
|
||||
view->v6_aaaa = dns_aaaa_break_dnssec;
|
||||
else
|
||||
INSIST(0);
|
||||
}
|
||||
|
||||
CHECK(configure_view_acl(vconfig, config, named_g_config,
|
||||
"filter-aaaa", NULL, actx,
|
||||
named_g_mctx, &view->aaaa_acl));
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "prefetch", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
@@ -5226,10 +5254,11 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
* Load DynDB modules.
|
||||
*/
|
||||
dyndb_list = NULL;
|
||||
if (voptions != NULL)
|
||||
if (voptions != NULL) {
|
||||
(void)cfg_map_get(voptions, "dyndb", &dyndb_list);
|
||||
else
|
||||
} else {
|
||||
(void)cfg_map_get(config, "dyndb", &dyndb_list);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DLOPEN
|
||||
for (element = cfg_list_first(dyndb_list);
|
||||
@@ -5251,6 +5280,31 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Load plugins.
|
||||
*/
|
||||
plugin_list = NULL;
|
||||
if (voptions != NULL) {
|
||||
(void)cfg_map_get(voptions, "plugin", &plugin_list);
|
||||
} else {
|
||||
(void)cfg_map_get(config, "plugin", &plugin_list);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DLOPEN
|
||||
if (plugin_list != NULL) {
|
||||
INSIST(view->hooktable == NULL);
|
||||
CHECK(ns_hooktable_create(view->mctx,
|
||||
(ns_hooktable_t **) &view->hooktable));
|
||||
view->hooktable_free = ns_hooktable_free;
|
||||
|
||||
ns_plugins_create(view->mctx, (ns_plugins_t **)&view->plugins);
|
||||
view->plugins_free = ns_plugins_free;
|
||||
|
||||
CHECK(cfg_pluginlist_foreach(config, plugin_list, named_g_lctx,
|
||||
register_one_plugin, view));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Setup automatic empty zones. If recursion is off then
|
||||
* they are disabled by default.
|
||||
@@ -5281,7 +5335,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);
|
||||
|
||||
@@ -5319,14 +5373,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];
|
||||
@@ -5686,16 +5742,18 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
|
||||
"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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7577,11 +7635,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(named_g_addparser);
|
||||
result = cfg_parse_buffer3(named_g_addparser, *text, zone_name, 0,
|
||||
@@ -8017,8 +8075,12 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
|
||||
/*
|
||||
* Check the validity of the configuration.
|
||||
*
|
||||
* (Ignore plugin parameters for now; they will be
|
||||
* checked later when the modules are actually loaded and
|
||||
* registered.)
|
||||
*/
|
||||
CHECK(bind9_check_namedconf(config, named_g_lctx, named_g_mctx));
|
||||
CHECK(bind9_check_namedconf(config, false, named_g_lctx, named_g_mctx));
|
||||
|
||||
/*
|
||||
* Fill in the maps array, used for resolving defaults.
|
||||
@@ -8906,7 +8968,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
named_g_memstatistics = cfg_obj_asboolean(obj);
|
||||
} else {
|
||||
named_g_memstatistics =
|
||||
(isc_mem_debugging & ISC_MEM_DEBUGRECORD);
|
||||
((isc_mem_debugging & ISC_MEM_DEBUGRECORD) != 0);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -9001,6 +9063,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
server->sctx->cookiealg = ns_cookiealg_sha256;
|
||||
} else {
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
@@ -9258,6 +9321,7 @@ view_loaded(void *arg) {
|
||||
"FIPS mode is %s",
|
||||
FIPS_mode() ? "enabled" : "disabled");
|
||||
#endif
|
||||
server->reload_in_progress = false;
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
|
||||
@@ -9311,7 +9375,11 @@ load_zones(named_server_t *server, bool init, bool reconfig) {
|
||||
* zones.
|
||||
*/
|
||||
isc_refcount_increment(&zl->refs);
|
||||
CHECK(dns_view_asyncload(view, reconfig, view_loaded, zl));
|
||||
result = dns_view_asyncload(view, reconfig, view_loaded, zl);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
(void)isc_refcount_decrement(&zl->refs);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@@ -9327,8 +9395,7 @@ load_zones(named_server_t *server, bool init, bool reconfig) {
|
||||
* the initial server setup; it isn't necessary during
|
||||
* a reload.)
|
||||
*/
|
||||
isc_taskmgr_setmode(named_g_taskmgr,
|
||||
isc_taskmgrmode_privileged);
|
||||
isc_taskmgr_setprivilegedmode(named_g_taskmgr);
|
||||
}
|
||||
|
||||
isc_task_endexclusive(server->task);
|
||||
@@ -9459,6 +9526,9 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
|
||||
dns_view_detach(&view);
|
||||
}
|
||||
|
||||
/*
|
||||
* Shut down all dyndb instances.
|
||||
*/
|
||||
dns_dyndb_cleanup(true);
|
||||
|
||||
while ((nsc = ISC_LIST_HEAD(server->cachelist)) != NULL) {
|
||||
@@ -9576,8 +9646,8 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
|
||||
&server->in_roothints),
|
||||
"setting up root hints");
|
||||
|
||||
CHECKFATAL(isc_mutex_init(&server->reload_event_lock),
|
||||
"initializing reload event lock");
|
||||
isc_mutex_init(&server->reload_event_lock);
|
||||
|
||||
server->reload_event =
|
||||
isc_event_allocate(named_g_mctx, server,
|
||||
NAMED_EVENT_RELOAD,
|
||||
@@ -9587,6 +9657,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
|
||||
CHECKFATAL(server->reload_event == NULL ?
|
||||
ISC_R_NOMEMORY : ISC_R_SUCCESS,
|
||||
"allocating reload event");
|
||||
server->reload_in_progress = true;
|
||||
|
||||
/*
|
||||
* Setup the server task, which is responsible for coordinating
|
||||
@@ -9897,6 +9968,7 @@ loadconfig(named_server_t *server) {
|
||||
static isc_result_t
|
||||
reload(named_server_t *server) {
|
||||
isc_result_t result;
|
||||
server->reload_in_progress = true;
|
||||
CHECK(loadconfig(server));
|
||||
|
||||
result = load_zones(server, false, false);
|
||||
@@ -9921,7 +9993,7 @@ static void
|
||||
named_server_reload(isc_task_t *task, isc_event_t *event) {
|
||||
named_server_t *server = (named_server_t *)event->ev_arg;
|
||||
|
||||
INSIST(task = server->task);
|
||||
INSIST(task == server->task);
|
||||
UNUSED(task);
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
@@ -10243,6 +10315,7 @@ named_server_reloadcommand(named_server_t *server, isc_lex_t *lex,
|
||||
isc_result_t
|
||||
named_server_reconfigcommand(named_server_t *server) {
|
||||
isc_result_t result;
|
||||
server->reload_in_progress = true;
|
||||
|
||||
CHECK(loadconfig(server));
|
||||
|
||||
@@ -10791,10 +10864,10 @@ named_server_dumpdb(named_server_t *server, isc_lex_t *lex,
|
||||
}
|
||||
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);
|
||||
@@ -10877,7 +10950,7 @@ named_server_dumpsecroots(named_server_t *server, isc_lex_t *lex,
|
||||
continue;
|
||||
}
|
||||
CHECK(putstr(text, "\n Negative trust anchors:\n\n"));
|
||||
CHECK(dns_ntatable_totext(ntatable, text));
|
||||
CHECK(dns_ntatable_totext(ntatable, NULL, text));
|
||||
}
|
||||
if (ptr != NULL)
|
||||
ptr = next_token(lex, text);
|
||||
@@ -11388,6 +11461,10 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
|
||||
server->sctx->tcpquota.used, server->sctx->tcpquota.max);
|
||||
CHECK(putstr(text, line));
|
||||
|
||||
if (server->reload_in_progress) {
|
||||
CHECK(putstr(text, "reload/reconfig in progress"));
|
||||
}
|
||||
|
||||
CHECK(putstr(text, "server is up and running"));
|
||||
CHECK(putnull(text));
|
||||
|
||||
@@ -12082,9 +12159,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
|
||||
@@ -12098,6 +12181,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);
|
||||
|
||||
@@ -12149,7 +12233,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(named_g_lctx,
|
||||
NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_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);
|
||||
@@ -12428,6 +12526,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
|
||||
@@ -12517,7 +12616,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(named_g_lctx,
|
||||
NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_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);
|
||||
@@ -12587,7 +12700,7 @@ newzone_parse(named_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);
|
||||
@@ -12598,12 +12711,14 @@ newzone_parse(named_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
|
||||
@@ -13619,8 +13734,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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -13642,6 +13763,7 @@ named_server_showzone(named_server_t *server, isc_lex_t *lex,
|
||||
cfg_obj_t *nzconfig = NULL;
|
||||
#endif /* HAVE_LMDB */
|
||||
bool added, redirect;
|
||||
ns_dzarg_t dzarg;
|
||||
|
||||
/* Parse parameters */
|
||||
CHECK(zone_from_args(server, lex, NULL, &zone, zonename,
|
||||
@@ -13701,9 +13823,14 @@ named_server_showzone(named_server_t *server, isc_lex_t *lex,
|
||||
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;
|
||||
|
||||
@@ -14097,8 +14224,8 @@ named_server_zonestatus(named_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);
|
||||
@@ -14314,6 +14441,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
char *ptr, *nametext = NULL, *viewname;
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
char viewbuf[DNS_NAME_FORMATSIZE];
|
||||
isc_stdtime_t now, when;
|
||||
isc_time_t t;
|
||||
char tbuf[64];
|
||||
@@ -14323,8 +14451,9 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
const dns_name_t *ntaname;
|
||||
dns_name_t *fname;
|
||||
dns_ttl_t ntattl;
|
||||
bool ttlset = false, excl = false;
|
||||
bool ttlset = false, excl = false, viewfound = false;
|
||||
dns_rdataclass_t rdclass = dns_rdataclass_in;
|
||||
bool first = true;
|
||||
|
||||
UNUSED(force);
|
||||
|
||||
@@ -14337,13 +14466,16 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
|
||||
/* Check for options */
|
||||
ptr = next_token(lex, text);
|
||||
if (ptr == NULL) {
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
}
|
||||
|
||||
if (argcheck(ptr, "dump")) {
|
||||
if (strcmp(ptr, "--") == 0) {
|
||||
break;
|
||||
} else if (argcheck(ptr, "dump")) {
|
||||
dump = true;
|
||||
} else if (argcheck(ptr, "remove")) {
|
||||
ntattl = 0;
|
||||
@@ -14388,6 +14520,9 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
tr.length = strlen(ptr);
|
||||
CHECK(dns_rdataclass_fromtext(&rdclass, &tr));
|
||||
continue;
|
||||
} else if (ptr[0] == '-') {
|
||||
msg = "Unknown option";
|
||||
CHECK(DNS_R_SYNTAX);
|
||||
} else {
|
||||
nametext = ptr;
|
||||
}
|
||||
@@ -14410,7 +14545,8 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
continue;
|
||||
}
|
||||
CHECK(dns_ntatable_totext(ntatable, text));
|
||||
|
||||
CHECK(dns_ntatable_totext(ntatable, view->name, text));
|
||||
}
|
||||
CHECK(putnull(text));
|
||||
|
||||
@@ -14425,7 +14561,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
CHECK(ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
/* Get the NTA name. */
|
||||
/* Get the NTA name if not found above. */
|
||||
if (nametext == NULL) {
|
||||
nametext = next_token(lex, text);
|
||||
}
|
||||
@@ -14448,6 +14584,14 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
|
||||
/* Look for the view name. */
|
||||
viewname = next_token(lex, text);
|
||||
if (viewname != NULL) {
|
||||
strlcpy(viewbuf, viewname, DNS_NAME_FORMATSIZE);
|
||||
viewname = viewbuf;
|
||||
}
|
||||
|
||||
if (next_token(lex, text) != NULL) {
|
||||
CHECK(DNS_R_SYNTAX);
|
||||
}
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
@@ -14458,11 +14602,10 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
view != NULL;
|
||||
view = ISC_LIST_NEXT(view, link))
|
||||
{
|
||||
static bool first = true;
|
||||
|
||||
if (viewname != NULL && strcmp(view->name, viewname) != 0) {
|
||||
continue;
|
||||
}
|
||||
viewfound = true;
|
||||
|
||||
if (view->rdclass != rdclass && rdclass != dns_rdataclass_any) {
|
||||
continue;
|
||||
@@ -14518,22 +14661,37 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
"added NTA '%s' (%d sec) in view '%s'",
|
||||
namebuf, ntattl, view->name);
|
||||
} else {
|
||||
CHECK(dns_ntatable_delete(ntatable, ntaname));
|
||||
bool removed;
|
||||
|
||||
result = dns_ntatable_delete(ntatable, ntaname);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
removed = true;
|
||||
} else if (result == ISC_R_NOTFOUND) {
|
||||
removed = false;
|
||||
} else {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!first) {
|
||||
CHECK(putstr(text, "\n"));
|
||||
}
|
||||
first = false;
|
||||
|
||||
CHECK(putstr(text, "Negative trust anchor removed: "));
|
||||
CHECK(putstr(text, "Negative trust anchor "));
|
||||
CHECK(putstr(text, removed ? "removed: "
|
||||
: "not found: "));
|
||||
CHECK(putstr(text, namebuf));
|
||||
CHECK(putstr(text, "/"));
|
||||
CHECK(putstr(text, view->name));
|
||||
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
|
||||
"removed NTA '%s' in view %s",
|
||||
namebuf, view->name);
|
||||
if (removed) {
|
||||
isc_log_write(named_g_lctx,
|
||||
NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER,
|
||||
ISC_LOG_INFO,
|
||||
"removed NTA '%s' in view %s",
|
||||
namebuf, view->name);
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_view_saventa(view);
|
||||
@@ -14546,6 +14704,11 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
}
|
||||
}
|
||||
|
||||
if (!viewfound) {
|
||||
msg = "No such view";
|
||||
CHECK(ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
CHECK(putnull(text));
|
||||
|
||||
cleanup:
|
||||
@@ -14553,6 +14716,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
(void) putstr(text, msg);
|
||||
(void) putnull(text);
|
||||
}
|
||||
|
||||
if (excl) {
|
||||
isc_task_endexclusive(server->task);
|
||||
}
|
||||
@@ -14750,7 +14914,7 @@ mkey_dumpzone(dns_view_t *view, isc_buffer_t **text) {
|
||||
|
||||
dns_rdata_toregion(&rdata, &r);
|
||||
isc_region_consume(&r, 12);
|
||||
keyid = dst_region_computeid(&r, kd.algorithm);
|
||||
keyid = dst_region_computeid(&r);
|
||||
|
||||
snprintf(buf, sizeof(buf), "\n keyid: %u", keyid);
|
||||
CHECK(putstr(text, buf));
|
||||
@@ -14759,7 +14923,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)
|
||||
@@ -14881,29 +15045,17 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
|
||||
/* 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);
|
||||
@@ -14932,6 +15084,9 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
|
||||
|
||||
switch (opt) {
|
||||
case REFRESH:
|
||||
if (!first) {
|
||||
CHECK(putstr(text, "\n"));
|
||||
}
|
||||
CHECK(mkey_refresh(view, text));
|
||||
break;
|
||||
case STATUS:
|
||||
@@ -14939,21 +15094,25 @@ named_server_mkeys(named_server_t *server, isc_lex_t *lex,
|
||||
CHECK(putstr(text, "\n\n"));
|
||||
}
|
||||
CHECK(mkey_status(view, text));
|
||||
first = false;
|
||||
break;
|
||||
case SYNC:
|
||||
CHECK(dns_zone_flush(view->managed_keys));
|
||||
break;
|
||||
case DESTROY:
|
||||
if (!first) {
|
||||
CHECK(putstr(text, "\n"));
|
||||
}
|
||||
CHECK(mkey_destroy(server, view, text));
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
|
||||
if (viewtxt != NULL) {
|
||||
break;
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
|
||||
@@ -3226,7 +3226,7 @@ destroy_listener(void *arg) {
|
||||
/* We don't have to acquire the lock here since it's already unlinked */
|
||||
dns_acl_detach(&listener->acl);
|
||||
|
||||
DESTROYLOCK(&listener->lock);
|
||||
isc_mutex_destroy(&listener->lock);
|
||||
isc_mem_putanddetach(&listener->mctx, listener, sizeof(*listener));
|
||||
}
|
||||
|
||||
@@ -3253,11 +3253,7 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
|
||||
listener->mctx = NULL;
|
||||
ISC_LINK_INIT(listener, link);
|
||||
|
||||
result = isc_mutex_init(&listener->lock);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(server->mctx, listener, sizeof(*listener));
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
isc_mutex_init(&listener->lock);
|
||||
|
||||
isc_mem_attach(server->mctx, &listener->mctx);
|
||||
|
||||
@@ -3352,7 +3348,7 @@ cleanup:
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (listener->acl != NULL)
|
||||
dns_acl_detach(&listener->acl);
|
||||
DESTROYLOCK(&listener->lock);
|
||||
isc_mutex_destroy(&listener->lock);
|
||||
isc_mem_putanddetach(&listener->mctx, listener,
|
||||
sizeof(*listener));
|
||||
}
|
||||
|
||||
@@ -252,14 +252,12 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
|
||||
}
|
||||
|
||||
/* Initialize the lock */
|
||||
result = isc_mutex_init(&cd->lock);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto failed;
|
||||
isc_mutex_init(&cd->lock);
|
||||
|
||||
/* 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
|
||||
@@ -364,15 +362,19 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
|
||||
|
||||
failed:
|
||||
dlopen_log(ISC_LOG_ERROR, "dlz_dlopen of '%s' failed", dlzname);
|
||||
if (cd->dl_path != NULL)
|
||||
if (cd->dl_path != NULL) {
|
||||
isc_mem_free(mctx, cd->dl_path);
|
||||
if (cd->dlzname != NULL)
|
||||
}
|
||||
if (cd->dlzname != NULL) {
|
||||
isc_mem_free(mctx, cd->dlzname);
|
||||
if (dlopen_flags != 0)
|
||||
(void) isc_mutex_destroy(&cd->lock);
|
||||
}
|
||||
if (dlopen_flags != 0) {
|
||||
isc_mutex_destroy(&cd->lock);
|
||||
}
|
||||
#ifdef HAVE_DLCLOSE
|
||||
if (cd->dl_handle)
|
||||
if (cd->dl_handle) {
|
||||
dlclose(cd->dl_handle);
|
||||
}
|
||||
#endif
|
||||
isc_mem_put(mctx, cd, sizeof(*cd));
|
||||
isc_mem_destroy(&mctx);
|
||||
@@ -395,17 +397,20 @@ dlopen_dlz_destroy(void *driverarg, void *dbdata) {
|
||||
MAYBE_UNLOCK(cd);
|
||||
}
|
||||
|
||||
if (cd->dl_path)
|
||||
if (cd->dl_path) {
|
||||
isc_mem_free(cd->mctx, cd->dl_path);
|
||||
if (cd->dlzname)
|
||||
}
|
||||
if (cd->dlzname) {
|
||||
isc_mem_free(cd->mctx, cd->dlzname);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DLCLOSE
|
||||
if (cd->dl_handle)
|
||||
if (cd->dl_handle) {
|
||||
dlclose(cd->dl_handle);
|
||||
}
|
||||
#endif
|
||||
|
||||
(void) isc_mutex_destroy(&cd->lock);
|
||||
isc_mutex_destroy(&cd->lock);
|
||||
|
||||
mctx = cd->mctx;
|
||||
isc_mem_put(mctx, cd, sizeof(*cd));
|
||||
|
||||
@@ -253,9 +253,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
|
||||
triedload = true;
|
||||
|
||||
/* Initialize the lock */
|
||||
result = isc_mutex_init(&cd->lock);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto failed;
|
||||
isc_mutex_init(&cd->lock);
|
||||
|
||||
/* Open the library */
|
||||
cd->dl_handle = LoadLibraryA(cd->dl_path);
|
||||
@@ -349,17 +347,21 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup_lock:
|
||||
DESTROYLOCK(&cd->lock);
|
||||
isc_mutex_destroy(&cd->lock);
|
||||
failed:
|
||||
dlopen_log(ISC_LOG_ERROR, "dlz_dlopen of '%s' failed", dlzname);
|
||||
if (cd->dl_path)
|
||||
if (cd->dl_path) {
|
||||
isc_mem_free(mctx, cd->dl_path);
|
||||
if (cd->dlzname)
|
||||
}
|
||||
if (cd->dlzname) {
|
||||
isc_mem_free(mctx, cd->dlzname);
|
||||
if (triedload)
|
||||
(void) isc_mutex_destroy(&cd->lock);
|
||||
if (cd->dl_handle)
|
||||
}
|
||||
if (triedload) {
|
||||
isc_mutex_destroy(&cd->lock);
|
||||
}
|
||||
if (cd->dl_handle) {
|
||||
FreeLibrary(cd->dl_handle);
|
||||
}
|
||||
isc_mem_put(mctx, cd, sizeof(*cd));
|
||||
isc_mem_destroy(&mctx);
|
||||
return (result);
|
||||
@@ -390,7 +392,7 @@ dlopen_dlz_destroy(void *driverarg, void *dbdata) {
|
||||
if (cd->dl_handle)
|
||||
FreeLibrary(cd->dl_handle);
|
||||
|
||||
DESTROYLOCK(&cd->lock);
|
||||
isc_mutex_destroy(&cd->lock);
|
||||
|
||||
mctx = cd->mctx;
|
||||
isc_mem_put(mctx, cd, sizeof(*cd));
|
||||
|
||||
+66
-37
@@ -125,7 +125,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 */
|
||||
@@ -231,12 +231,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));
|
||||
@@ -764,6 +766,7 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
|
||||
break;
|
||||
default:
|
||||
INSIST(0);
|
||||
ISC_UNREACHABLE();
|
||||
}
|
||||
result = named_checknames_get(maps, zone, objp);
|
||||
INSIST(result == ISC_R_SUCCESS && objp != NULL && *objp != NULL);
|
||||
@@ -903,7 +906,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
||||
const dns_master_style_t *masterstyle = &dns_master_style_default;
|
||||
isc_stats_t *zoneqrystats;
|
||||
dns_stats_t *rcvquerystats;
|
||||
dns_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;
|
||||
@@ -1027,14 +1030,16 @@ named_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;
|
||||
@@ -1050,12 +1055,14 @@ named_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;
|
||||
@@ -1141,16 +1148,18 @@ named_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);
|
||||
@@ -1166,14 +1175,16 @@ named_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);
|
||||
|
||||
@@ -1211,12 +1222,14 @@ named_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();
|
||||
}
|
||||
}
|
||||
notifytype = process_notifytype(notifytype, ztype, zname,
|
||||
nodefault);
|
||||
@@ -1374,8 +1387,10 @@ named_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);
|
||||
@@ -1410,8 +1425,10 @@ named_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;
|
||||
@@ -1562,14 +1579,16 @@ named_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);
|
||||
}
|
||||
@@ -1622,8 +1641,10 @@ named_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);
|
||||
|
||||
@@ -1637,8 +1658,10 @@ named_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);
|
||||
|
||||
@@ -1674,8 +1697,10 @@ named_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);
|
||||
|
||||
@@ -1689,8 +1714,10 @@ named_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);
|
||||
@@ -1706,13 +1733,15 @@ named_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
@@ -144,8 +144,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;
|
||||
@@ -2354,6 +2354,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();
|
||||
@@ -2769,6 +2771,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();
|
||||
}
|
||||
@@ -3178,6 +3182,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)
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
# 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.
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
|
||||
${NS_INCLUDES} ${DNS_INCLUDES} \
|
||||
${ISCCFG_INCLUDES} ${ISC_INCLUDES}
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
LIBS =
|
||||
|
||||
SO_TARGETS = lib/filter-aaaa.@SO@
|
||||
TARGETS = @SO_TARGETS@
|
||||
|
||||
SO_OBJS = filter-aaaa.@O@
|
||||
SO_SRCS = filter-aaaa.c
|
||||
|
||||
CFLAGS = @CFLAGS@ @SO_CFLAGS@
|
||||
SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@
|
||||
|
||||
MANPAGES = filter-aaaa.8
|
||||
|
||||
HTMLPAGES = filter-aaaa.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
lib/filter-aaaa.@SO@: filter-aaaa.@SO@
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs `pwd`/lib
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL} filter-aaaa.@SO@ `pwd`/lib
|
||||
|
||||
filter-aaaa.@SO@: filter-aaaa.@O@
|
||||
${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} -o $@ \
|
||||
filter-aaaa.@O@ ${LIBS}
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
clean distclean::
|
||||
rm -f filter-aaaa.so
|
||||
rm -f ${TARGETS} ${OBJS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
|
||||
|
||||
install:: filter-aaaa.@SO@ installdirs
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} filter-aaaa.@SO@ \
|
||||
${DESTDIR}${libdir}
|
||||
${INSTALL_DATA} ${srcdir}/filter-aaaa.8 ${DESTDIR}${mandir}/man8
|
||||
|
||||
uninstall::
|
||||
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/filter-aaaa.@SO@
|
||||
rm -f ${DESTDIR}${mandir}/man8/filter-aaaa.8
|
||||
@@ -0,0 +1,116 @@
|
||||
.\" Copyright (C) 2018 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/.
|
||||
.\"
|
||||
.hy 0
|
||||
.ad l
|
||||
'\" t
|
||||
.\" Title: filter-aaaa.so
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2018-08-13
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "FILTER\-AAAA\&.SO" "8" "2018\-08\-13" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
filter-aaaa.so \- filter AAAA in DNS responses when A is present
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBplugin\ query\ "filter\-aaaa\&.so"\fR\ 'u
|
||||
\fBplugin query "filter\-aaaa\&.so"\fR [\fI{\ parameters\ }\fR];
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBfilter\-aaaa\&.so\fR
|
||||
is a query plugin module for
|
||||
\fBnamed\fR, enabling
|
||||
\fBnamed\fR
|
||||
to omit some IPv6 addresses when responding to clients\&.
|
||||
.PP
|
||||
Until BIND 9\&.12, this feature was implemented natively in
|
||||
\fBnamed\fR
|
||||
and enabled with the
|
||||
\fBfilter\-aaaa\fR
|
||||
ACL and the
|
||||
\fBfilter\-aaaa\-on\-v4\fR
|
||||
and
|
||||
\fBfilter\-aaaa\-on\-v6\fR
|
||||
options\&. These options are now deprecated in
|
||||
named\&.conf, but can be passed as parameters to the
|
||||
\fBfilter\-aaaa\&.so\fR
|
||||
plugin, for example:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
plugin query "/usr/local/lib/filter\-aaaa\&.so" {
|
||||
filter\-aaaa\-on\-v4 yes;
|
||||
filter\-aaaa\-on\-v6 yes;
|
||||
filter\-aaaa { 192\&.0\&.2\&.1; 2001:db8:2::1; };
|
||||
};
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
This module is intended to aid transition from IPv4 to IPv6 by withholding IPv6 addresses from DNS clients which are not connected to the IPv6 Internet, when the name being looked up has an IPv4 address available\&. Use of this module is not recommended unless absolutely necessary\&.
|
||||
.PP
|
||||
Note: This mechanism can erroneously cause other servers not to give AAAA records to their clients\&. If a recursing server with both IPv6 and IPv4 network connections queries an authoritative server using this mechanism via IPv4, it will be denied AAAA records even if its client is using IPv6\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\fBfilter\-aaaa\fR
|
||||
.RS 4
|
||||
Specifies a list of client addresses for which AAAA filtering is to be applied\&. The default is
|
||||
\fBany\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBfilter\-aaaa\-on\-v4\fR
|
||||
.RS 4
|
||||
If set to
|
||||
\fByes\fR, the DNS client is at an IPv4 address, in
|
||||
\fBfilter\-aaaa\fR, and if the response does not include DNSSEC signatures, then all AAAA records are deleted from the response\&. This filtering applies to all responses and not only authoritative responses\&.
|
||||
.sp
|
||||
If set to
|
||||
\fBbreak\-dnssec\fR, then AAAA records are deleted even when DNSSEC is enabled\&. As suggested by the name, this causes the response to fail to verify, because the DNSSEC protocol is designed to detect deletions\&.
|
||||
.sp
|
||||
This mechanism can erroneously cause other servers not to give AAAA records to their clients\&. A recursing server with both IPv6 and IPv4 network connections that queries an authoritative server using this mechanism via IPv4 will be denied AAAA records even if its client is using IPv6\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBfilter\-aaaa\-on\-v6\fR
|
||||
.RS 4
|
||||
Identical to
|
||||
\fBfilter\-aaaa\-on\-v4\fR, except it filters AAAA responses to queries from IPv6 clients instead of IPv4 clients\&. To filter all responses, set both options to
|
||||
\fByes\fR\&.
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
BIND 9 Administrator Reference Manual\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
@@ -0,0 +1,926 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/ht.h>
|
||||
#include <isc/lib.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isccfg/aclconf.h>
|
||||
#include <isccfg/cfg.h>
|
||||
#include <isccfg/grammar.h>
|
||||
|
||||
#include <ns/client.h>
|
||||
#include <ns/hooks.h>
|
||||
#include <ns/log.h>
|
||||
#include <ns/query.h>
|
||||
#include <ns/types.h>
|
||||
|
||||
#include <dns/acl.h>
|
||||
#include <dns/db.h>
|
||||
#include <dns/enumtype.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/message.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#define CHECK(op) \
|
||||
do { \
|
||||
result = (op); \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
goto cleanup; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Possible values for the settings of filter-aaaa-on-v4 and
|
||||
* filter-aaaa-on-v6: "no" is NONE, "yes" is FILTER, "break-dnssec"
|
||||
* is BREAK_DNSSEC.
|
||||
*/
|
||||
typedef enum {
|
||||
NONE = 0,
|
||||
FILTER = 1,
|
||||
BREAK_DNSSEC = 2
|
||||
} filter_aaaa_t;
|
||||
|
||||
/*
|
||||
* Persistent data for use by this module. This will be associated
|
||||
* with client object address in the hash table, and will remain
|
||||
* accessible until the client object is detached.
|
||||
*/
|
||||
typedef struct filter_data {
|
||||
filter_aaaa_t mode;
|
||||
uint32_t flags;
|
||||
} filter_data_t;
|
||||
|
||||
typedef struct filter_instance {
|
||||
ns_plugin_t *module;
|
||||
isc_mem_t *mctx;
|
||||
|
||||
/*
|
||||
* Memory pool for use with persistent data.
|
||||
*/
|
||||
isc_mempool_t *datapool;
|
||||
|
||||
/*
|
||||
* Hash table associating a client object with its persistent data.
|
||||
*/
|
||||
isc_ht_t *ht;
|
||||
|
||||
/*
|
||||
* Values configured when the module is loaded.
|
||||
*/
|
||||
filter_aaaa_t v4_aaaa;
|
||||
filter_aaaa_t v6_aaaa;
|
||||
dns_acl_t *aaaa_acl;
|
||||
} filter_instance_t;
|
||||
|
||||
/*
|
||||
* Per-client flags set by this module
|
||||
*/
|
||||
#define FILTER_AAAA_RECURSING 0x0001 /* Recursing for A */
|
||||
#define FILTER_AAAA_FILTERED 0x0002 /* AAAA was removed from answer */
|
||||
|
||||
/*
|
||||
* Client attribute tests.
|
||||
*/
|
||||
#define WANTDNSSEC(c) (((c)->attributes & NS_CLIENTATTR_WANTDNSSEC) != 0)
|
||||
#define RECURSIONOK(c) (((c)->query.attributes & \
|
||||
NS_QUERYATTR_RECURSIONOK) != 0)
|
||||
|
||||
/*
|
||||
* Forward declarations of functions referenced in install_hooks().
|
||||
*/
|
||||
static ns_hookresult_t
|
||||
filter_qctx_initialize(void *arg, void *cbdata, isc_result_t *resp);
|
||||
static ns_hookresult_t
|
||||
filter_respond_begin(void *arg, void *cbdata, isc_result_t *resp);
|
||||
static ns_hookresult_t
|
||||
filter_respond_any_found(void *arg, void *cbdata, isc_result_t *resp);
|
||||
static ns_hookresult_t
|
||||
filter_prep_response_begin(void *arg, void *cbdata, isc_result_t *resp);
|
||||
static ns_hookresult_t
|
||||
filter_query_done_send(void *arg, void *cbdata, isc_result_t *resp);
|
||||
static ns_hookresult_t
|
||||
filter_qctx_destroy(void *arg, void *cbdata, isc_result_t *resp);
|
||||
|
||||
/*%
|
||||
* Register the functions to be called at each hook point in 'hooktable', using
|
||||
* memory context 'mctx' for allocating copies of stack-allocated structures
|
||||
* passed to ns_hook_add(). Make sure 'inst' will be passed as the 'cbdata'
|
||||
* argument to every callback.
|
||||
*/
|
||||
static void
|
||||
install_hooks(ns_hooktable_t *hooktable, isc_mem_t *mctx,
|
||||
filter_instance_t *inst)
|
||||
{
|
||||
const ns_hook_t filter_init = {
|
||||
.action = filter_qctx_initialize,
|
||||
.action_data = inst,
|
||||
};
|
||||
|
||||
const ns_hook_t filter_respbegin = {
|
||||
.action = filter_respond_begin,
|
||||
.action_data = inst,
|
||||
};
|
||||
|
||||
const ns_hook_t filter_respanyfound = {
|
||||
.action = filter_respond_any_found,
|
||||
.action_data = inst,
|
||||
};
|
||||
|
||||
const ns_hook_t filter_prepresp = {
|
||||
.action = filter_prep_response_begin,
|
||||
.action_data = inst,
|
||||
};
|
||||
|
||||
const ns_hook_t filter_donesend = {
|
||||
.action = filter_query_done_send,
|
||||
.action_data = inst,
|
||||
};
|
||||
|
||||
const ns_hook_t filter_destroy = {
|
||||
.action = filter_qctx_destroy,
|
||||
.action_data = inst,
|
||||
};
|
||||
|
||||
ns_hook_add(hooktable, mctx, -
|
||||
NS_QUERY_QCTX_INITIALIZED, &filter_init);
|
||||
ns_hook_add(hooktable, mctx,
|
||||
NS_QUERY_RESPOND_BEGIN, &filter_respbegin);
|
||||
ns_hook_add(hooktable, mctx,
|
||||
NS_QUERY_RESPOND_ANY_FOUND, &filter_respanyfound);
|
||||
ns_hook_add(hooktable, mctx,
|
||||
NS_QUERY_PREP_RESPONSE_BEGIN, &filter_prepresp);
|
||||
ns_hook_add(hooktable, mctx,
|
||||
NS_QUERY_DONE_SEND, &filter_donesend);
|
||||
ns_hook_add(hooktable, mctx,
|
||||
NS_QUERY_QCTX_DESTROYED, &filter_destroy);
|
||||
}
|
||||
|
||||
/**
|
||||
** Support for parsing of parameters and configuration of the module.
|
||||
**/
|
||||
|
||||
/*
|
||||
* Support for parsing of parameters.
|
||||
*/
|
||||
static const char *filter_aaaa_enums[] = { "break-dnssec", NULL };
|
||||
|
||||
static isc_result_t
|
||||
parse_filter_aaaa(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
|
||||
return (cfg_parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
|
||||
}
|
||||
|
||||
static void
|
||||
doc_filter_aaaa(cfg_printer_t *pctx, const cfg_type_t *type) {
|
||||
cfg_doc_enum_or_other(pctx, type, &cfg_type_boolean);
|
||||
}
|
||||
|
||||
static cfg_type_t cfg_type_filter_aaaa = {
|
||||
"filter_aaaa", parse_filter_aaaa, cfg_print_ustring,
|
||||
doc_filter_aaaa, &cfg_rep_string, filter_aaaa_enums,
|
||||
};
|
||||
|
||||
static cfg_clausedef_t param_clauses[] = {
|
||||
{ "filter-aaaa", &cfg_type_bracketed_aml, 0 },
|
||||
{ "filter-aaaa-on-v4", &cfg_type_filter_aaaa, 0 },
|
||||
{ "filter-aaaa-on-v6", &cfg_type_filter_aaaa, 0 },
|
||||
};
|
||||
|
||||
static cfg_clausedef_t *param_clausesets[] = {
|
||||
param_clauses,
|
||||
NULL
|
||||
};
|
||||
|
||||
static cfg_type_t cfg_type_parameters = {
|
||||
"filter-aaaa-params", cfg_parse_mapbody, cfg_print_mapbody,
|
||||
cfg_doc_mapbody, &cfg_rep_map, param_clausesets
|
||||
};
|
||||
|
||||
static isc_result_t
|
||||
parse_filter_aaaa_on(const cfg_obj_t *param_obj, const char *param_name,
|
||||
filter_aaaa_t *dstp)
|
||||
{
|
||||
const cfg_obj_t *obj = NULL;
|
||||
isc_result_t result;
|
||||
|
||||
result = cfg_map_get(param_obj, param_name, &obj);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (cfg_obj_isboolean(obj)) {
|
||||
if (cfg_obj_asboolean(obj)) {
|
||||
*dstp = FILTER;
|
||||
} else {
|
||||
*dstp = NONE;
|
||||
}
|
||||
} else if (strcasecmp(cfg_obj_asstring(obj), "break-dnssec") == 0) {
|
||||
*dstp = BREAK_DNSSEC;
|
||||
} else {
|
||||
result = ISC_R_UNEXPECTED;
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
check_syntax(cfg_obj_t *fmap, const void *cfg,
|
||||
isc_mem_t *mctx, isc_log_t *lctx, void *actx)
|
||||
{
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
const cfg_obj_t *aclobj = NULL;
|
||||
dns_acl_t *acl = NULL;
|
||||
filter_aaaa_t f4 = NONE, f6 = NONE;
|
||||
|
||||
cfg_map_get(fmap, "filter-aaaa", &aclobj);
|
||||
if (aclobj == NULL) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
CHECK(cfg_acl_fromconfig(aclobj, (const cfg_obj_t *) cfg,
|
||||
lctx, (cfg_aclconfctx_t *) actx,
|
||||
mctx, 0, &acl));
|
||||
|
||||
CHECK(parse_filter_aaaa_on(fmap, "filter-aaaa-on-v4", &f4));
|
||||
CHECK(parse_filter_aaaa_on(fmap, "filter-aaaa-on-v6", &f6));
|
||||
|
||||
if ((f4 != NONE || f6 != NONE) && dns_acl_isnone(acl)) {
|
||||
cfg_obj_log(aclobj, lctx, ISC_LOG_WARNING,
|
||||
"\"filter-aaaa\" is 'none;' but "
|
||||
"either filter-aaaa-on-v4 or filter-aaaa-on-v6 "
|
||||
"is enabled");
|
||||
result = ISC_R_FAILURE;
|
||||
} else if (f4 == NONE && f6 == NONE && !dns_acl_isnone(acl)) {
|
||||
cfg_obj_log(aclobj, lctx, ISC_LOG_WARNING,
|
||||
"\"filter-aaaa\" is set but "
|
||||
"neither filter-aaaa-on-v4 or filter-aaaa-on-v6 "
|
||||
"is enabled");
|
||||
result = ISC_R_FAILURE;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (acl != NULL) {
|
||||
dns_acl_detach(&acl);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
parse_parameters(filter_instance_t *inst, const char *parameters,
|
||||
const void *cfg, const char *cfg_file, unsigned long cfg_line,
|
||||
isc_mem_t *mctx, isc_log_t *lctx, void *actx)
|
||||
{
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
cfg_parser_t *parser = NULL;
|
||||
cfg_obj_t *param_obj = NULL;
|
||||
const cfg_obj_t *obj = NULL;
|
||||
isc_buffer_t b;
|
||||
|
||||
CHECK(cfg_parser_create(mctx, lctx, &parser));
|
||||
|
||||
isc_buffer_constinit(&b, parameters, strlen(parameters));
|
||||
isc_buffer_add(&b, strlen(parameters));
|
||||
CHECK(cfg_parse_buffer4(parser, &b, cfg_file, cfg_line,
|
||||
&cfg_type_parameters, 0, ¶m_obj));
|
||||
|
||||
CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx));
|
||||
|
||||
CHECK(parse_filter_aaaa_on(param_obj, "filter-aaaa-on-v4",
|
||||
&inst->v4_aaaa));
|
||||
CHECK(parse_filter_aaaa_on(param_obj, "filter-aaaa-on-v6",
|
||||
&inst->v6_aaaa));
|
||||
|
||||
result = cfg_map_get(param_obj, "filter-aaaa", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
CHECK(cfg_acl_fromconfig(obj, (const cfg_obj_t *) cfg,
|
||||
lctx, (cfg_aclconfctx_t *) actx,
|
||||
mctx, 0, &inst->aaaa_acl));
|
||||
} else {
|
||||
CHECK(dns_acl_any(mctx, &inst->aaaa_acl));
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (param_obj != NULL) {
|
||||
cfg_obj_destroy(parser, ¶m_obj);
|
||||
}
|
||||
if (parser != NULL) {
|
||||
cfg_parser_destroy(&parser);
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
/**
|
||||
** Mandatory plugin API functions:
|
||||
**
|
||||
** - plugin_destroy
|
||||
** - plugin_register
|
||||
** - plugin_version
|
||||
** - plugin_check
|
||||
**/
|
||||
|
||||
/*
|
||||
* Called by ns_plugin_register() to initialize the plugin and
|
||||
* register hook functions into the view hook table.
|
||||
*/
|
||||
isc_result_t
|
||||
plugin_register(const char *parameters,
|
||||
const void *cfg, const char *cfg_file, unsigned long cfg_line,
|
||||
isc_mem_t *mctx, isc_log_t *lctx, void *actx,
|
||||
ns_hooktable_t *hooktable, void **instp)
|
||||
{
|
||||
filter_instance_t *inst = NULL;
|
||||
isc_result_t result;
|
||||
|
||||
|
||||
isc_log_write(lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
|
||||
"registering 'filter-aaaa' "
|
||||
"module from %s:%lu, %s parameters",
|
||||
cfg_file, cfg_line, parameters != NULL ? "with" : "no");
|
||||
|
||||
inst = isc_mem_get(mctx, sizeof(*inst));
|
||||
memset(inst, 0, sizeof(*inst));
|
||||
isc_mem_attach(mctx, &inst->mctx);
|
||||
|
||||
if (parameters != NULL) {
|
||||
CHECK(parse_parameters(inst, parameters, cfg, cfg_file,
|
||||
cfg_line, mctx, lctx, actx));
|
||||
}
|
||||
|
||||
CHECK(isc_mempool_create(mctx, sizeof(filter_data_t),
|
||||
&inst->datapool));
|
||||
CHECK(isc_ht_init(&inst->ht, mctx, 16));
|
||||
|
||||
/*
|
||||
* Fill the mempool with 1K filter_aaaa state objects at
|
||||
* a time; ideally after a single allocation, the mempool will
|
||||
* have enough to handle all the simultaneous queries the system
|
||||
* requires and it won't be necessary to allocate more.
|
||||
*
|
||||
* We don't set any limit on the number of free state objects
|
||||
* so that they'll always be returned to the pool and not
|
||||
* freed until the pool is destroyed on shutdown.
|
||||
*/
|
||||
isc_mempool_setfillcount(inst->datapool, 1024);
|
||||
isc_mempool_setfreemax(inst->datapool, UINT_MAX);
|
||||
|
||||
/*
|
||||
* Set hook points in the view's hooktable.
|
||||
*/
|
||||
install_hooks(hooktable, mctx, inst);
|
||||
|
||||
*instp = inst;
|
||||
|
||||
cleanup:
|
||||
if (result != ISC_R_SUCCESS && inst != NULL) {
|
||||
plugin_destroy((void **) &inst);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
plugin_check(const char *parameters,
|
||||
const void *cfg, const char *cfg_file, unsigned long cfg_line,
|
||||
isc_mem_t *mctx, isc_log_t *lctx, void *actx)
|
||||
{
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
cfg_parser_t *parser = NULL;
|
||||
cfg_obj_t *param_obj = NULL;
|
||||
isc_buffer_t b;
|
||||
|
||||
CHECK(cfg_parser_create(mctx, lctx, &parser));
|
||||
|
||||
isc_buffer_constinit(&b, parameters, strlen(parameters));
|
||||
isc_buffer_add(&b, strlen(parameters));
|
||||
CHECK(cfg_parse_buffer4(parser, &b, cfg_file, cfg_line,
|
||||
&cfg_type_parameters, 0, ¶m_obj));
|
||||
|
||||
CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx));
|
||||
|
||||
cleanup:
|
||||
if (param_obj != NULL) {
|
||||
cfg_obj_destroy(parser, ¶m_obj);
|
||||
}
|
||||
if (parser != NULL) {
|
||||
cfg_parser_destroy(&parser);
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called by ns_plugins_free(); frees memory allocated by
|
||||
* the module when it was registered.
|
||||
*/
|
||||
void
|
||||
plugin_destroy(void **instp) {
|
||||
filter_instance_t *inst = (filter_instance_t *) *instp;
|
||||
|
||||
if (inst->ht != NULL) {
|
||||
isc_ht_destroy(&inst->ht);
|
||||
}
|
||||
if (inst->datapool != NULL) {
|
||||
isc_mempool_destroy(&inst->datapool);
|
||||
}
|
||||
if (inst->aaaa_acl != NULL) {
|
||||
dns_acl_detach(&inst->aaaa_acl);
|
||||
}
|
||||
|
||||
isc_mem_putanddetach(&inst->mctx, inst, sizeof(*inst));
|
||||
*instp = NULL;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns plugin API version for compatibility checks.
|
||||
*/
|
||||
int
|
||||
plugin_version(void) {
|
||||
return (NS_PLUGIN_VERSION);
|
||||
}
|
||||
|
||||
/**
|
||||
** "filter-aaaa" feature implementation begins here.
|
||||
**/
|
||||
|
||||
/*%
|
||||
* Structure describing the filtering to be applied by process_section().
|
||||
*/
|
||||
typedef struct section_filter {
|
||||
query_ctx_t * qctx;
|
||||
filter_aaaa_t mode;
|
||||
dns_section_t section;
|
||||
const dns_name_t * name;
|
||||
dns_rdatatype_t type;
|
||||
bool only_if_a_exists;
|
||||
} section_filter_t;
|
||||
|
||||
/*
|
||||
* Check whether this is an IPv4 client.
|
||||
*/
|
||||
static bool
|
||||
is_v4_client(ns_client_t *client) {
|
||||
if (isc_sockaddr_pf(&client->peeraddr) == AF_INET) {
|
||||
return (true);
|
||||
}
|
||||
if (isc_sockaddr_pf(&client->peeraddr) == AF_INET6 &&
|
||||
IN6_IS_ADDR_V4MAPPED(&client->peeraddr.type.sin6.sin6_addr))
|
||||
{
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check whether this is an IPv6 client.
|
||||
*/
|
||||
static bool
|
||||
is_v6_client(ns_client_t *client) {
|
||||
if (isc_sockaddr_pf(&client->peeraddr) == AF_INET6 &&
|
||||
!IN6_IS_ADDR_V4MAPPED(&client->peeraddr.type.sin6.sin6_addr))
|
||||
{
|
||||
return (true);
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
static filter_data_t *
|
||||
client_state_get(const query_ctx_t *qctx, filter_instance_t *inst) {
|
||||
filter_data_t *client_state = NULL;
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_ht_find(inst->ht, (const unsigned char *)&qctx->client,
|
||||
sizeof(qctx->client), (void **)&client_state);
|
||||
|
||||
return (result == ISC_R_SUCCESS ? client_state : NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
client_state_create(const query_ctx_t *qctx, filter_instance_t *inst) {
|
||||
filter_data_t *client_state;
|
||||
isc_result_t result;
|
||||
|
||||
client_state = isc_mempool_get(inst->datapool);
|
||||
if (client_state == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
client_state->mode = NONE;
|
||||
client_state->flags = 0;
|
||||
|
||||
result = isc_ht_add(inst->ht, (const unsigned char *)&qctx->client,
|
||||
sizeof(qctx->client), client_state);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
client_state_destroy(const query_ctx_t *qctx, filter_instance_t *inst) {
|
||||
filter_data_t *client_state = client_state_get(qctx, inst);
|
||||
isc_result_t result;
|
||||
|
||||
if (client_state == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
result = isc_ht_delete(inst->ht, (const unsigned char *)&qctx->client,
|
||||
sizeof(qctx->client));
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
isc_mempool_put(inst->datapool, client_state);
|
||||
}
|
||||
|
||||
/*%
|
||||
* Mark 'rdataset' and 'sigrdataset' as rendered, gracefully handling NULL
|
||||
* pointers and non-associated rdatasets.
|
||||
*/
|
||||
static void
|
||||
mark_as_rendered(dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) {
|
||||
if (rdataset != NULL && dns_rdataset_isassociated(rdataset)) {
|
||||
rdataset->attributes |= DNS_RDATASETATTR_RENDERED;
|
||||
}
|
||||
if (sigrdataset != NULL && dns_rdataset_isassociated(sigrdataset)) {
|
||||
sigrdataset->attributes |= DNS_RDATASETATTR_RENDERED;
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* Check whether an RRset of given 'type' is present at given 'name'. If
|
||||
* it is found and either it is not signed or the combination of query
|
||||
* flags and configured processing 'mode' allows it, mark the RRset and its
|
||||
* associated signatures as already rendered to prevent them from appearing
|
||||
* in the response message stored in 'qctx'. If 'only_if_a_exists' is
|
||||
* true, an RRset of type A must also exist at 'name' in order for the
|
||||
* above processing to happen.
|
||||
*/
|
||||
static bool
|
||||
process_name(query_ctx_t *qctx, filter_aaaa_t mode, const dns_name_t *name,
|
||||
dns_rdatatype_t type, bool only_if_a_exists)
|
||||
{
|
||||
dns_rdataset_t *rdataset = NULL, *sigrdataset = NULL;
|
||||
isc_result_t result;
|
||||
bool modified = false;
|
||||
|
||||
if (only_if_a_exists) {
|
||||
CHECK(dns_message_findtype(name, dns_rdatatype_a, 0, NULL));
|
||||
}
|
||||
|
||||
(void)dns_message_findtype(name, type, 0, &rdataset);
|
||||
(void)dns_message_findtype(name, dns_rdatatype_rrsig, type,
|
||||
&sigrdataset);
|
||||
|
||||
if (rdataset != NULL &&
|
||||
(sigrdataset == NULL || !WANTDNSSEC(qctx->client) ||
|
||||
mode == BREAK_DNSSEC))
|
||||
{
|
||||
/*
|
||||
* An RRset of given 'type' was found at 'name' and at least
|
||||
* one of the following is true:
|
||||
*
|
||||
* - the RRset is not signed,
|
||||
* - the client did not set the DO bit in its request,
|
||||
* - configuration allows us to tamper with signed responses.
|
||||
*
|
||||
* This means it is okay to filter out this RRset and its
|
||||
* signatures, if any, from the response.
|
||||
*/
|
||||
mark_as_rendered(rdataset, sigrdataset);
|
||||
modified = true;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
return (modified);
|
||||
}
|
||||
|
||||
/*%
|
||||
* Apply the requested section filter, i.e. prevent (when possible, as
|
||||
* determined by process_name()) RRsets of given 'type' from being rendered
|
||||
* in the given 'section' of the response message stored in 'qctx'. Clear
|
||||
* the AD bit if the answer and/or authority section was modified. If
|
||||
* 'name' is NULL, all names in the given 'section' are processed;
|
||||
* otherwise, only 'name' is. 'only_if_a_exists' is passed through to
|
||||
* process_name().
|
||||
*/
|
||||
static void
|
||||
process_section(const section_filter_t *filter) {
|
||||
query_ctx_t *qctx = filter->qctx;
|
||||
filter_aaaa_t mode = filter->mode;
|
||||
dns_section_t section = filter->section;
|
||||
const dns_name_t *name = filter->name;
|
||||
dns_rdatatype_t type = filter->type;
|
||||
bool only_if_a_exists = filter->only_if_a_exists;
|
||||
|
||||
dns_message_t *message = qctx->client->message;
|
||||
isc_result_t result;
|
||||
|
||||
for (result = dns_message_firstname(message, section);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_message_nextname(message, section))
|
||||
{
|
||||
dns_name_t *cur = NULL;
|
||||
dns_message_currentname(message, section, &cur);
|
||||
if (name != NULL && !dns_name_equal(name, cur)) {
|
||||
/*
|
||||
* We only want to process 'name' and this is not it.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!process_name(qctx, mode, cur, type, only_if_a_exists)) {
|
||||
/*
|
||||
* Response was not modified, do not touch the AD bit.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
if (section == DNS_SECTION_ANSWER ||
|
||||
section == DNS_SECTION_AUTHORITY)
|
||||
{
|
||||
message->flags &= ~DNS_MESSAGEFLAG_AD;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize filter state, fetching it from a memory pool and storing it
|
||||
* in a hash table keyed according to the client object; this enables us to
|
||||
* retrieve persistent data related to a client query for as long as the
|
||||
* object persists.
|
||||
*/
|
||||
static ns_hookresult_t
|
||||
filter_qctx_initialize(void *arg, void *cbdata, isc_result_t *resp) {
|
||||
query_ctx_t *qctx = (query_ctx_t *) arg;
|
||||
filter_instance_t *inst = (filter_instance_t *) cbdata;
|
||||
filter_data_t *client_state;
|
||||
|
||||
*resp = ISC_R_UNSET;
|
||||
|
||||
client_state = client_state_get(qctx, inst);
|
||||
if (client_state == NULL) {
|
||||
client_state_create(qctx, inst);
|
||||
}
|
||||
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine whether this client should have AAAA filtered or not, based on
|
||||
* the client address family and the settings of filter-aaaa-on-v4 and
|
||||
* filter-aaaa-on-v6.
|
||||
*/
|
||||
static ns_hookresult_t
|
||||
filter_prep_response_begin(void *arg, void *cbdata, isc_result_t *resp) {
|
||||
query_ctx_t *qctx = (query_ctx_t *) arg;
|
||||
filter_instance_t *inst = (filter_instance_t *) cbdata;
|
||||
filter_data_t *client_state = client_state_get(qctx, inst);
|
||||
isc_result_t result;
|
||||
|
||||
*resp = ISC_R_UNSET;
|
||||
|
||||
if (client_state == NULL) {
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
if (inst->v4_aaaa != NONE || inst->v6_aaaa != NONE) {
|
||||
result = ns_client_checkaclsilent(qctx->client, NULL,
|
||||
inst->aaaa_acl, true);
|
||||
if (result == ISC_R_SUCCESS &&
|
||||
inst->v4_aaaa != NONE &&
|
||||
is_v4_client(qctx->client))
|
||||
{
|
||||
client_state->mode = inst->v4_aaaa;
|
||||
} else if (result == ISC_R_SUCCESS &&
|
||||
inst->v6_aaaa != NONE &&
|
||||
is_v6_client(qctx->client))
|
||||
{
|
||||
client_state->mode = inst->v6_aaaa;
|
||||
}
|
||||
}
|
||||
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide AAAA rrsets if there is a matching A. Trigger recursion if
|
||||
* necessary to find out whether an A exists.
|
||||
*
|
||||
* (This version is for processing answers to explicit AAAA queries; ANY
|
||||
* queries are handled in filter_respond_any_found().)
|
||||
*/
|
||||
static ns_hookresult_t
|
||||
filter_respond_begin(void *arg, void *cbdata, isc_result_t *resp) {
|
||||
query_ctx_t *qctx = (query_ctx_t *) arg;
|
||||
filter_instance_t *inst = (filter_instance_t *) cbdata;
|
||||
filter_data_t *client_state = client_state_get(qctx, inst);
|
||||
isc_result_t result = ISC_R_UNSET;
|
||||
|
||||
*resp = ISC_R_UNSET;
|
||||
|
||||
if (client_state == NULL) {
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
if (client_state->mode != BREAK_DNSSEC &&
|
||||
(client_state->mode != FILTER ||
|
||||
(WANTDNSSEC(qctx->client) && qctx->sigrdataset != NULL &&
|
||||
dns_rdataset_isassociated(qctx->sigrdataset))))
|
||||
{
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
if (qctx->qtype == dns_rdatatype_aaaa) {
|
||||
dns_rdataset_t *trdataset;
|
||||
trdataset = ns_client_newrdataset(qctx->client);
|
||||
result = dns_db_findrdataset(qctx->db, qctx->node,
|
||||
qctx->version,
|
||||
dns_rdatatype_a, 0,
|
||||
qctx->client->now,
|
||||
trdataset, NULL);
|
||||
if (dns_rdataset_isassociated(trdataset)) {
|
||||
dns_rdataset_disassociate(trdataset);
|
||||
}
|
||||
ns_client_putrdataset(qctx->client, &trdataset);
|
||||
|
||||
/*
|
||||
* We found an AAAA. If we also found an A, then the AAAA
|
||||
* must not be rendered.
|
||||
*
|
||||
* If the A is not in our cache, then any result other than
|
||||
* DNS_R_DELEGATION or ISC_R_NOTFOUND means there is no A,
|
||||
* and so AAAAs are okay.
|
||||
*
|
||||
* We assume there is no A if we can't recurse for this
|
||||
* client. That might be the wrong answer, but what else
|
||||
* can we do? Besides, the fact that we have the AAAA and
|
||||
* are using this mechanism in the first place suggests
|
||||
* that we care more about As than AAAAs, and would have
|
||||
* cached an A if it existed.
|
||||
*/
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
mark_as_rendered(qctx->rdataset, qctx->sigrdataset);
|
||||
qctx->client->message->flags &= ~DNS_MESSAGEFLAG_AD;
|
||||
client_state->flags |= FILTER_AAAA_FILTERED;
|
||||
} else if (!qctx->authoritative &&
|
||||
RECURSIONOK(qctx->client) &&
|
||||
(result == DNS_R_DELEGATION ||
|
||||
result == ISC_R_NOTFOUND))
|
||||
{
|
||||
/*
|
||||
* This is an ugly kludge to recurse
|
||||
* for the A and discard the result.
|
||||
*
|
||||
* Continue to add the AAAA now.
|
||||
* We'll make a note to not render it
|
||||
* if the recursion for the A succeeds.
|
||||
*/
|
||||
result = ns_query_recurse(qctx->client,
|
||||
dns_rdatatype_a,
|
||||
qctx->client->query.qname,
|
||||
NULL, NULL, qctx->resuming);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
client_state->flags |= FILTER_AAAA_RECURSING;
|
||||
qctx->client->query.attributes |=
|
||||
NS_QUERYATTR_RECURSING;
|
||||
}
|
||||
}
|
||||
} else if (qctx->qtype == dns_rdatatype_a &&
|
||||
(client_state->flags & FILTER_AAAA_RECURSING) != 0)
|
||||
{
|
||||
const section_filter_t filter_answer = {
|
||||
.qctx = qctx,
|
||||
.mode = client_state->mode,
|
||||
.section = DNS_SECTION_ANSWER,
|
||||
.name = qctx->fname,
|
||||
.type = dns_rdatatype_aaaa,
|
||||
};
|
||||
process_section(&filter_answer);
|
||||
|
||||
client_state->flags &= ~FILTER_AAAA_RECURSING;
|
||||
|
||||
result = ns_query_done(qctx);
|
||||
|
||||
*resp = result;
|
||||
|
||||
return (NS_HOOK_RETURN);
|
||||
}
|
||||
|
||||
*resp = result;
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* When answering an ANY query, remove AAAA if A is present.
|
||||
*/
|
||||
static ns_hookresult_t
|
||||
filter_respond_any_found(void *arg, void *cbdata, isc_result_t *resp) {
|
||||
query_ctx_t *qctx = (query_ctx_t *) arg;
|
||||
filter_instance_t *inst = (filter_instance_t *) cbdata;
|
||||
filter_data_t *client_state = client_state_get(qctx, inst);
|
||||
|
||||
*resp = ISC_R_UNSET;
|
||||
|
||||
if (client_state != NULL && client_state->mode != NONE) {
|
||||
/*
|
||||
* If we are authoritative, require an A record to be
|
||||
* present before filtering out AAAA records; otherwise,
|
||||
* just assume an A record exists even if it was not in the
|
||||
* cache (and therefore is not in the response message),
|
||||
* thus proceeding with filtering out AAAA records.
|
||||
*/
|
||||
const section_filter_t filter_answer = {
|
||||
.qctx = qctx,
|
||||
.mode = client_state->mode,
|
||||
.section = DNS_SECTION_ANSWER,
|
||||
.name = qctx->tname,
|
||||
.type = dns_rdatatype_aaaa,
|
||||
.only_if_a_exists = qctx->authoritative,
|
||||
};
|
||||
process_section(&filter_answer);
|
||||
}
|
||||
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide AAAA rrsets in the additional section if there is a matching A, and
|
||||
* hide NS in the authority section if AAAA was filtered in the answer
|
||||
* section.
|
||||
*/
|
||||
static ns_hookresult_t
|
||||
filter_query_done_send(void *arg, void *cbdata, isc_result_t *resp) {
|
||||
query_ctx_t *qctx = (query_ctx_t *) arg;
|
||||
filter_instance_t *inst = (filter_instance_t *) cbdata;
|
||||
filter_data_t *client_state = client_state_get(qctx, inst);
|
||||
|
||||
*resp = ISC_R_UNSET;
|
||||
|
||||
if (client_state != NULL && client_state->mode != NONE) {
|
||||
const section_filter_t filter_additional = {
|
||||
.qctx = qctx,
|
||||
.mode = client_state->mode,
|
||||
.section = DNS_SECTION_ADDITIONAL,
|
||||
.type = dns_rdatatype_aaaa,
|
||||
.only_if_a_exists = true,
|
||||
};
|
||||
process_section(&filter_additional);
|
||||
|
||||
if ((client_state->flags & FILTER_AAAA_FILTERED) != 0) {
|
||||
const section_filter_t filter_authority = {
|
||||
.qctx = qctx,
|
||||
.mode = client_state->mode,
|
||||
.section = DNS_SECTION_AUTHORITY,
|
||||
.type = dns_rdatatype_ns,
|
||||
};
|
||||
process_section(&filter_authority);
|
||||
}
|
||||
}
|
||||
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the client is being detached, then we can delete our persistent data
|
||||
* from hash table and return it to the memory pool.
|
||||
*/
|
||||
static ns_hookresult_t
|
||||
filter_qctx_destroy(void *arg, void *cbdata, isc_result_t *resp) {
|
||||
query_ctx_t *qctx = (query_ctx_t *) arg;
|
||||
filter_instance_t *inst = (filter_instance_t *) cbdata;
|
||||
|
||||
*resp = ISC_R_UNSET;
|
||||
|
||||
if (!qctx->detach_client) {
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
|
||||
client_state_destroy(qctx, inst);
|
||||
|
||||
return (NS_HOOK_CONTINUE);
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
<!--
|
||||
- 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.
|
||||
-->
|
||||
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.filter-aaaa">
|
||||
<info>
|
||||
<date>2018-08-13</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
|
||||
</refentryinfo>
|
||||
<refmeta>
|
||||
<refentrytitle><application>filter-aaaa.so</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>filter-aaaa.so</application></refname>
|
||||
<refpurpose>filter AAAA in DNS responses when A is present</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<docinfo>
|
||||
<copyright>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>plugin query "filter-aaaa.so"</command>
|
||||
<arg choice="opt" rep="norepeat"><replaceable class="parameter">{ parameters }</replaceable></arg>;
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
<para>
|
||||
<command>filter-aaaa.so</command> is a query plugin module for
|
||||
<command>named</command>, enabling <command>named</command>
|
||||
to omit some IPv6 addresses when responding to clients.
|
||||
</para>
|
||||
<para>
|
||||
Until BIND 9.12, this feature was implemented natively in
|
||||
<command>named</command> and enabled with the
|
||||
<command>filter-aaaa</command> ACL and the
|
||||
<command>filter-aaaa-on-v4</command> and
|
||||
<command>filter-aaaa-on-v6</command> options. These options are
|
||||
now deprecated in <filename>named.conf</filename>, but can be
|
||||
passed as parameters to the <command>filter-aaaa.so</command>
|
||||
plugin, for example:
|
||||
</para>
|
||||
<programlisting>
|
||||
plugin query "/usr/local/lib/filter-aaaa.so" {
|
||||
filter-aaaa-on-v4 yes;
|
||||
filter-aaaa-on-v6 yes;
|
||||
filter-aaaa { 192.0.2.1; 2001:db8:2::1; };
|
||||
};
|
||||
</programlisting>
|
||||
<para>
|
||||
This module is intended to aid transition from IPv4 to IPv6 by
|
||||
withholding IPv6 addresses from DNS clients which are not connected
|
||||
to the IPv6 Internet, when the name being looked up has an IPv4
|
||||
address available. Use of this module is not recommended unless
|
||||
absolutely necessary.
|
||||
</para>
|
||||
<para>
|
||||
Note: This mechanism can erroneously cause other servers not to
|
||||
give AAAA records to their clients. If a recursing server with
|
||||
both IPv6 and IPv4 network connections queries an authoritative
|
||||
server using this mechanism via IPv4, it will be denied AAAA
|
||||
records even if its client is using IPv6.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><command>filter-aaaa</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a list of client addresses for which AAAA
|
||||
filtering is to be applied. The default is
|
||||
<userinput>any</userinput>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><command>filter-aaaa-on-v4</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If set to <userinput>yes</userinput>, the DNS client is
|
||||
at an IPv4 address, in <command>filter-aaaa</command>,
|
||||
and if the response does not include DNSSEC signatures,
|
||||
then all AAAA records are deleted from the response.
|
||||
This filtering applies to all responses and not only
|
||||
authoritative responses.
|
||||
</para>
|
||||
<para>
|
||||
If set to <userinput>break-dnssec</userinput>,
|
||||
then AAAA records are deleted even when DNSSEC is
|
||||
enabled. As suggested by the name, this causes the
|
||||
response to fail to verify, because the DNSSEC protocol is
|
||||
designed to detect deletions.
|
||||
</para>
|
||||
<para>
|
||||
This mechanism can erroneously cause other servers not to
|
||||
give AAAA records to their clients. A recursing server with
|
||||
both IPv6 and IPv4 network connections that queries an
|
||||
authoritative server using this mechanism via IPv4 will be
|
||||
denied AAAA records even if its client is using IPv6.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><command>filter-aaaa-on-v6</command></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Identical to <command>filter-aaaa-on-v4</command>,
|
||||
except it filters AAAA responses to queries from IPv6
|
||||
clients instead of IPv4 clients. To filter all
|
||||
responses, set both options to <userinput>yes</userinput>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>SEE ALSO</title></info>
|
||||
<para>
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
</refentry>
|
||||
@@ -0,0 +1,135 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2018 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/.
|
||||
-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>filter-aaaa.so</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
|
||||
<a name="man.filter-aaaa"></a><div class="titlepage"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="refnamediv">
|
||||
<h2>Name</h2>
|
||||
<p>
|
||||
<span class="application">filter-aaaa.so</span>
|
||||
— filter AAAA in DNS responses when A is present
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">plugin query "filter-aaaa.so"</code>
|
||||
[<em class="replaceable"><code>{ parameters }</code></em>];
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
<p>
|
||||
<span class="command"><strong>filter-aaaa.so</strong></span> is a query plugin module for
|
||||
<span class="command"><strong>named</strong></span>, enabling <span class="command"><strong>named</strong></span>
|
||||
to omit some IPv6 addresses when responding to clients.
|
||||
</p>
|
||||
<p>
|
||||
Until BIND 9.12, this feature was implemented natively in
|
||||
<span class="command"><strong>named</strong></span> and enabled with the
|
||||
<span class="command"><strong>filter-aaaa</strong></span> ACL and the
|
||||
<span class="command"><strong>filter-aaaa-on-v4</strong></span> and
|
||||
<span class="command"><strong>filter-aaaa-on-v6</strong></span> options. These options are
|
||||
now deprecated in <code class="filename">named.conf</code>, but can be
|
||||
passed as parameters to the <span class="command"><strong>filter-aaaa.so</strong></span>
|
||||
plugin, for example:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
plugin query "/usr/local/lib/filter-aaaa.so" {
|
||||
filter-aaaa-on-v4 yes;
|
||||
filter-aaaa-on-v6 yes;
|
||||
filter-aaaa { 192.0.2.1; 2001:db8:2::1; };
|
||||
};
|
||||
</pre>
|
||||
<p>
|
||||
This module is intended to aid transition from IPv4 to IPv6 by
|
||||
withholding IPv6 addresses from DNS clients which are not connected
|
||||
to the IPv6 Internet, when the name being looked up has an IPv4
|
||||
address available. Use of this module is not recommended unless
|
||||
absolutely necessary.
|
||||
</p>
|
||||
<p>
|
||||
Note: This mechanism can erroneously cause other servers not to
|
||||
give AAAA records to their clients. If a recursing server with
|
||||
both IPv6 and IPv4 network connections queries an authoritative
|
||||
server using this mechanism via IPv4, it will be denied AAAA
|
||||
records even if its client is using IPv6.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term"><span class="command"><strong>filter-aaaa</strong></span></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies a list of client addresses for which AAAA
|
||||
filtering is to be applied. The default is
|
||||
<strong class="userinput"><code>any</code></strong>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>filter-aaaa-on-v4</strong></span></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
If set to <strong class="userinput"><code>yes</code></strong>, the DNS client is
|
||||
at an IPv4 address, in <span class="command"><strong>filter-aaaa</strong></span>,
|
||||
and if the response does not include DNSSEC signatures,
|
||||
then all AAAA records are deleted from the response.
|
||||
This filtering applies to all responses and not only
|
||||
authoritative responses.
|
||||
</p>
|
||||
<p>
|
||||
If set to <strong class="userinput"><code>break-dnssec</code></strong>,
|
||||
then AAAA records are deleted even when DNSSEC is
|
||||
enabled. As suggested by the name, this causes the
|
||||
response to fail to verify, because the DNSSEC protocol is
|
||||
designed to detect deletions.
|
||||
</p>
|
||||
<p>
|
||||
This mechanism can erroneously cause other servers not to
|
||||
give AAAA records to their clients. A recursing server with
|
||||
both IPv6 and IPv4 network connections that queries an
|
||||
authoritative server using this mechanism via IPv4 will be
|
||||
denied AAAA records even if its client is using IPv6.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>filter-aaaa-on-v6</strong></span></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Identical to <span class="command"><strong>filter-aaaa-on-v4</strong></span>,
|
||||
except it filters AAAA responses to queries from IPv6
|
||||
clients instead of IPv4 clients. To filter all
|
||||
responses, set both options to <strong class="userinput"><code>yes</code></strong>.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.9"></a><h2>SEE ALSO</h2>
|
||||
<p>
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -39,6 +39,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -215,7 +215,7 @@ Specifies the directory in which keys should be stored\&.
|
||||
.PP
|
||||
\fBkey\-size\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\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and size\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 2048 bits for RSA keys\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBkeyttl\fR
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -258,8 +258,7 @@
|
||||
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.
|
||||
configured, the default is 2048 bits for RSA keys.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><span class="command"><strong>keyttl</strong></span></span></dt>
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -71,7 +71,7 @@ class PolicyLex:
|
||||
return t
|
||||
|
||||
def t_ALGNAME(self, t):
|
||||
r'(?i)\b(RSAMD5|DH|ECC|RSASHA1|NSEC3RSASHA1|RSASHA256|RSASHA512|ECDSAP256SHA256|ECDSAP384SHA384|ED25519|ED448)\b'
|
||||
r'(?i)\b(DH|ECC|RSASHA1|NSEC3RSASHA1|RSASHA256|RSASHA512|ECDSAP256SHA256|ECDSAP384SHA384|ED25519|ED448)\b'
|
||||
t.value = t.value.upper()
|
||||
return t
|
||||
|
||||
@@ -132,8 +132,7 @@ class Policy:
|
||||
keyttl = None
|
||||
coverage = None
|
||||
directory = None
|
||||
valid_key_sz_per_algo = {'RSAMD5': [1024, 4096],
|
||||
'RSASHA1': [1024, 4096],
|
||||
valid_key_sz_per_algo = {'RSASHA1': [1024, 4096],
|
||||
'NSEC3RSASHA1': [512, 4096],
|
||||
'RSASHA256': [1024, 4096],
|
||||
'RSASHA512': [1024, 4096],
|
||||
@@ -322,10 +321,6 @@ class dnssec_policy:
|
||||
# set default algorithm policies
|
||||
|
||||
# these can use default settings
|
||||
self.alg_policy['RSAMD5'] = copy(p)
|
||||
self.alg_policy['RSAMD5'].algorithm = "RSAMD5"
|
||||
self.alg_policy['RSAMD5'].name = "RSAMD5"
|
||||
|
||||
self.alg_policy['RSASHA1'] = copy(p)
|
||||
self.alg_policy['RSASHA1'].algorithm = "RSASHA1"
|
||||
self.alg_policy['RSASHA1'].name = "RSASHA1"
|
||||
|
||||
+17
-9
@@ -386,7 +386,7 @@ See also
|
||||
\fBrndc trace\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBnta \fR\fB[( \-d | \-f | \-r | \-l \fIduration\fR)]\fR\fB \fR\fB\fIdomain\fR\fR\fB \fR\fB[\fIview\fR]\fR\fB \fR
|
||||
\fBnta \fR\fB[( \-class \fIclass\fR | \-dump | \-force | \-remove | \-lifetime \fIduration\fR)]\fR\fB \fR\fB\fIdomain\fR\fR\fB \fR\fB[\fIview\fR]\fR\fB \fR
|
||||
.RS 4
|
||||
Sets a DNSSEC negative trust anchor (NTA) for
|
||||
\fBdomain\fR, with a lifetime of
|
||||
@@ -418,7 +418,7 @@ option\&. TTL\-style suffixes can be used to specify the lifetime in seconds, mi
|
||||
to zero is equivalent to
|
||||
\fB\-remove\fR\&.
|
||||
.sp
|
||||
If
|
||||
If the
|
||||
\fB\-dump\fR
|
||||
is used, any other arguments are ignored, and a list of existing NTAs is printed (note that this may include NTAs that are expired but have not yet been cleaned up)\&.
|
||||
.sp
|
||||
@@ -430,11 +430,18 @@ option in the Administrator Reference Manual for details)\&. If data can be vali
|
||||
\fB\-force\fR
|
||||
overrides this behavior and forces an NTA to persist for its entire lifetime, regardless of whether data could be validated if the NTA were not present\&.
|
||||
.sp
|
||||
The view class can be specified with
|
||||
\fB\-class\fR\&. The default is class
|
||||
\fBIN\fR, which is the only class for which DNSSEC is currently supported\&.
|
||||
.sp
|
||||
All of these options can be shortened, i\&.e\&., to
|
||||
\fB\-l\fR,
|
||||
\fB\-r\fR,
|
||||
\fB\-d\fR, and
|
||||
\fB\-f\fR\&.
|
||||
\fB\-d\fR,
|
||||
\fB\-f\fR, and
|
||||
\fB\-c\fR\&.
|
||||
.sp
|
||||
Unrecognized options are treated as errors\&. To reference a domain or view name that begins with a hyphen, use a double\-hyphen on the command line to indicate the end of options\&.
|
||||
.RE
|
||||
.PP
|
||||
\fBquerylog\fR [ on | off ]
|
||||
@@ -695,13 +702,14 @@ in each view\&. The list both statically configured keys and dynamic TKEY\-negot
|
||||
.PP
|
||||
\fBvalidation ( on | off | status ) \fR\fB[\fIview \&.\&.\&.\fR]\fR\fB \fR
|
||||
.RS 4
|
||||
Enable, disable, or check the current status of DNSSEC validation\&. Note
|
||||
Enable, disable, or check the current status of DNSSEC validation\&. By default, validation is enabled\&. (Note that
|
||||
\fBdnssec\-enable\fR
|
||||
also needs to be set to
|
||||
must also be
|
||||
\fByes\fR
|
||||
or
|
||||
\fBauto\fR
|
||||
to be effective\&. It defaults to enabled\&.
|
||||
(the default value) for signatures to be returned along with validated data\&. If validation is enabled while
|
||||
\fBdnssec\-enable\fR
|
||||
is set to
|
||||
\fBno\fR, the server will validate internally, but will not supply clients with the necessary records to allow validity to be confirmed\&.)
|
||||
.RE
|
||||
.PP
|
||||
\fBzonestatus \fR\fB\fIzone\fR\fR\fB \fR\fB[\fIclass\fR [\fIview\fR]]\fR
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -650,6 +651,12 @@
|
||||
<option>-l</option>, <option>-r</option>, <option>-d</option>,
|
||||
<option>-f</option>, and <option>-c</option>.
|
||||
</para>
|
||||
<para>
|
||||
Unrecognized options are treated as errors. To reference
|
||||
a domain or view name that begins with a hyphen,
|
||||
use a double-hyphen on the command line to indicate the
|
||||
end of options.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
+22
-8
@@ -484,7 +484,7 @@
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><strong class="userinput"><code>nta
|
||||
[<span class="optional">( -d | -f | -r | -l <em class="replaceable"><code>duration</code></em>)</span>]
|
||||
[<span class="optional">( -class <em class="replaceable"><code>class</code></em> | -dump | -force | -remove | -lifetime <em class="replaceable"><code>duration</code></em>)</span>]
|
||||
<em class="replaceable"><code>domain</code></em>
|
||||
[<span class="optional"><em class="replaceable"><code>view</code></em></span>]
|
||||
</code></strong></span></dt>
|
||||
@@ -532,7 +532,7 @@
|
||||
is equivalent to <code class="option">-remove</code>.
|
||||
</p>
|
||||
<p>
|
||||
If <code class="option">-dump</code> is used, any other arguments
|
||||
If the <code class="option">-dump</code> is used, any other arguments
|
||||
are ignored, and a list of existing NTAs is printed
|
||||
(note that this may include NTAs that are expired but
|
||||
have not yet been cleaned up).
|
||||
@@ -549,10 +549,21 @@
|
||||
lifetime, regardless of whether data could be
|
||||
validated if the NTA were not present.
|
||||
</p>
|
||||
<p>
|
||||
The view class can be specified with <code class="option">-class</code>.
|
||||
The default is class <strong class="userinput"><code>IN</code></strong>, which is
|
||||
the only class for which DNSSEC is currently supported.
|
||||
</p>
|
||||
<p>
|
||||
All of these options can be shortened, i.e., to
|
||||
<code class="option">-l</code>, <code class="option">-r</code>, <code class="option">-d</code>,
|
||||
and <code class="option">-f</code>.
|
||||
<code class="option">-f</code>, and <code class="option">-c</code>.
|
||||
</p>
|
||||
<p>
|
||||
Unrecognized options are treated as errors. To reference
|
||||
a domain or view name that begins with a hyphen,
|
||||
use a double-hyphen on the command line to indicate the
|
||||
end of options.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><strong class="userinput"><code>querylog</code></strong> [<span class="optional"> on | off </span>] </span></dt>
|
||||
@@ -902,11 +913,14 @@
|
||||
<dd>
|
||||
<p>
|
||||
Enable, disable, or check the current status of
|
||||
DNSSEC validation.
|
||||
Note <span class="command"><strong>dnssec-enable</strong></span> also needs to be
|
||||
set to <strong class="userinput"><code>yes</code></strong> or
|
||||
<strong class="userinput"><code>auto</code></strong> to be effective.
|
||||
It defaults to enabled.
|
||||
DNSSEC validation. By default, validation is enabled.
|
||||
(Note that <span class="command"><strong>dnssec-enable</strong></span> must also be
|
||||
<strong class="userinput"><code>yes</code></strong> (the default value) for signatures
|
||||
to be returned along with validated data. If validation is
|
||||
enabled while <span class="command"><strong>dnssec-enable</strong></span> is set to
|
||||
<strong class="userinput"><code>no</code></strong>, the server will validate internally,
|
||||
but will not supply clients with the necessary records to allow
|
||||
validity to be confirmed.)
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><strong class="userinput"><code>zonestatus <em class="replaceable"><code>zone</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em> [<span class="optional"><em class="replaceable"><code>view</code></em></span>]</span>]</code></strong></span></dt>
|
||||
|
||||
@@ -46,6 +46,7 @@ options {
|
||||
memstatistics-file "named.memstats"; // _PATH_MEMSTATS
|
||||
|
||||
max-cache-ttl 999;
|
||||
min-cache-ttl 66;
|
||||
auth-nxdomain yes; // always set AA on NXDOMAIN.
|
||||
// don't set this to 'no' unless
|
||||
// you know what you're doing -- older
|
||||
@@ -148,6 +149,7 @@ options {
|
||||
min-refresh-time 777;
|
||||
|
||||
max-ncache-ttl 333;
|
||||
min-ncache-ttl 22;
|
||||
min-roots 15;
|
||||
serial-queries 34;
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ XTARGETS = adb_test@EXEEXT@ \
|
||||
backtrace_test_nosymtbl@EXEEXT@ \
|
||||
byname_test@EXEEXT@ \
|
||||
db_test@EXEEXT@ \
|
||||
dst_test@EXEEXT@ \
|
||||
gsstest@EXEEXT@ \
|
||||
fsaccess_test@EXEEXT@ \
|
||||
inter_test@EXEEXT@ \
|
||||
@@ -76,7 +75,6 @@ XSRCS = adb_test.c \
|
||||
backtrace_test.c \
|
||||
byname_test.c \
|
||||
db_test.c \
|
||||
dst_test.c \
|
||||
fsaccess_test.c \
|
||||
gsstest.c \
|
||||
inter_test.c \
|
||||
@@ -237,10 +235,6 @@ sig0_test@EXEEXT@: sig0_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ sig0_test.@O@ \
|
||||
${DNSLIBS} ${ISCLIBS} ${LIBS}
|
||||
|
||||
dst_test@EXEEXT@: dst_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
|
||||
-o $@ dst_test.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
|
||||
|
||||
gsstest@EXEEXT@: gsstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
|
||||
-o $@ gsstest.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
|
||||
|
||||
@@ -290,8 +290,8 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
result = isc_mutex_init(&client_lock);
|
||||
check_result(result, "isc_mutex_init(&client_lock)");
|
||||
isc_mutex_init(&client_lock);
|
||||
|
||||
ISC_LIST_INIT(clients);
|
||||
|
||||
/*
|
||||
|
||||
@@ -359,7 +359,6 @@ main(int argc, char *argv[]) {
|
||||
dbinfo *dbi;
|
||||
dns_dbversion_t *version;
|
||||
const dns_name_t *origin;
|
||||
size_t memory_quota = 0;
|
||||
dns_trust_t trust = 0;
|
||||
unsigned int addopts;
|
||||
isc_log_t *lctx = NULL;
|
||||
@@ -411,10 +410,6 @@ main(int argc, char *argv[]) {
|
||||
case 'P':
|
||||
pause_every = atoi(isc_commandline_argument);
|
||||
break;
|
||||
case 'Q':
|
||||
memory_quota = atoi(isc_commandline_argument);
|
||||
isc_mem_setquota(mctx, memory_quota);
|
||||
break;
|
||||
case 't':
|
||||
type = atoi(isc_commandline_argument);
|
||||
break;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user