Commit graph

3249 commits

Author SHA1 Message Date
Evan Hunt
aa1cf3c606 fix rpzrecurse test
- backport from v9_12 changes to enable rpzrecurse test to
  suspend and resume servers on win32
- use rndc to stop servers
2019-01-25 16:15:08 -08:00
Tony Finch
f72c687fa2 Fix a few cosmetic issues with rndc managed-keys
The handling of class and view arguments was broken, because the code
didn't realise that next_token() would overwrite the class name when
it parsed the view name. The code was trying to implement a syntax
like `refresh [[class] view]`, but it was documented to have a syntax
like `refresh [class [view]]`. The latter is consistent with other rndc
commands, so that is how I have fixed it.

Before:

$ rndc managed-keys refresh in rec
rndc: 'managed-keys' failed: unknown class/type
unknown class 'rec'

After:

$ rndc managed-keys refresh in rec
refreshing managed keys for 'rec'

There were missing newlines in the output from `rndc managed-keys
refresh` and `rndc managed-keys destroy`.

Before:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'refreshing managed keys for 'auth'

After:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'
refreshing managed keys for 'auth'

(cherry picked from commit 6a3b851f72)
(cherry picked from commit bc984ace12)
2019-01-14 18:19:22 -08:00
Tony Finch
81408256d3 cleanup: alphabetize rndc command dispatch 2019-01-14 13:02:02 +11:00
Mark Andrews
e4f7d6c418 explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove from dns_result_torcode
(cherry picked from commit 0c42a9c0ab)
2019-01-08 20:51:27 -08:00
Mark Andrews
84527eb4d5 update copyrights 2019-01-02 10:26:49 +11:00
Ondřej Surý
11cce88a41 gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define
(cherry picked from commit 8903d68d69)
2018-12-19 12:46:05 +01:00
Ondřej Surý
8fbd61343a Disable RTLD_DEEPBIND when compiled under AddressSanitizer
(cherry picked from commit cad6b39cab)
2018-12-19 10:51:09 +01:00
Mark Andrews
587c81ac99 create dns_rdatatype_atcname to split records that can appear along side CNAME from DNSSEC; dns_rdatatype_iszonecutauth allowed too many types
(cherry picked from commit f4ceb12b69)
2018-12-14 14:29:46 +11:00
Mark Andrews
e5e1957a8f use typebuf and classbuf 2018-12-11 12:26:25 +01:00
Mark Andrews
dc49ce1cd0 log RPZ type and class
(cherry picked from commit 28442f11f0)
2018-12-11 06:24:08 -05:00
Tony Finch
be4822fafd catz: improved log message when a zone is overridden
If you have a catalog zone containing 10.in-addr.arpa and an
explicitly-configured version which overrides the catz version,
`named` used to log:

catz: error "success" while trying to add zone "10.in-addr.arpa"

After this patch it logs:

catz: zone "10.in-addr.arpa" is overridden by explicitly configured zone
(cherry picked from commit 16eb35187a)
2018-12-03 15:57:03 +11:00
Mark Andrews
e254e95d7d address unchecked return values
(cherry picked from commit ccfd577715)
2018-11-22 06:56:25 +11:00
Mark Andrews
ccf915f7e4 don't use 'typename' as it is reserved in C++ 2018-11-14 11:13:21 -08:00
Ondřej Surý
2f8b28efad Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached
(cherry picked from commit 23fff6c569)
(cherry picked from commit 4568669807)
2018-11-08 22:42:52 +07:00
Ondřej Surý
12a266211e Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool
(cherry picked from commit b2b43fd235)
(cherry picked from commit fcd1569e2b)
2018-11-08 22:02:58 +07:00
Ondřej Surý
9d15323e24 Add small tweaks to the code to fix compilation when ISC assertions are disabled
While implementing the new unit testing framework cmocka, it was found that the
BIND 9 code doesn't compile when assertions are disabled or replaced with any
function (such as mock_assert() from cmocka unit testing framework) that's not
directly recognized as assertion by the compiler.

This made the compiler to complain about blocks of code that was recognized as
unreachable before, but now it isn't.

The changes in this commit include:

* assigns default values to couple of local variables,
* moves some return statements around INSIST assertions,
* adds __builtin_unreachable(); annotations after some INSIST assertions,
* fixes one broken assertion (= instead of ==)

(cherry picked from commit fbd2e47f51)
(cherry picked from commit b222783ae9)
2018-11-08 22:00:49 +07:00
Mark Andrews
f4bea4002a check requireservercookie even if rrl is configured
(cherry picked from commit d6f6eeda9d)
2018-11-06 10:33:32 +11:00
Ondřej Surý
a437c42521 Remove double result check leftover
(cherry picked from commit 065ff16e40)
2018-10-30 13:00:51 +01:00
Mark Andrews
332e0bc3c2 always call RUNTIME_CHECK(result == ISC_R_SUCCESS); for dns_rdata_tostruct
(cherry picked from commit e11cfafff2)
2018-10-29 18:30:16 +11:00
Michał Kępień
149aa691a6 Display a per-view list of zones in the web interface
The XSL stylesheet used by the web interface does not currently include
any element which would cause a list of zones configured in each view to
be displayed, making the "Zones" section of the web interface empty
unless some zone has been configured with "zone-statistics full;" and
queried.  Since this can be confusing, modify the XSL stylesheet so that
a list of zones configured in each view is displayed in the web
interface.

(cherry picked from commit aeda3f389e)
2018-10-25 10:23:17 +02:00
Michał Kępień
9e204a3376 Fix the configuration type used by the "server-addresses" option
Contrary to what the documentation states, the "server-addresses"
static-stub zone option does not accept custom port numbers.  Fix the
configuration type used by the "server-addresses" option to ensure
documentation matches source code.  Remove a check_zoneconf() test which
is unnecessary with this fix in place.

(cherry picked from commit b324576858)
2018-10-25 09:04:43 +02:00
Evan Hunt
d9849bb589 make update_log() work if zone is not set
- update_log() is called to log update errors, but if those errors
  occur before the zone is set (for example, when returning NOTAUTH)
  it returns without logging anything.

(cherry picked from commit 395f6a1474)
2018-10-03 02:39:37 -04:00
Tinderbox User
186cf94c9a prep 9.11.5rc1 2018-09-29 03:57:26 +00:00
Evan Hunt
1f72e316b9 add -class option to rndc nta
(cherry picked from commit cc0abf62a1)
2018-09-10 13:18:35 -07:00
Evan Hunt
af3bada56e report when NTAs added to multiple views
- the text returned by "rndc nta" when adding NTAs to multiple views
  was incorrectly terminated after the first line, so users only saw
  on NTA added unless they checked the logs.

(cherry picked from commit 83dc5a704a)
2018-09-10 13:18:33 -07:00
Witold Kręcicki
80a025d1a7 rndc reconfig should not stat on existing zones, just load new ones. 2018-08-28 16:53:43 +02:00
Michał Kępień
c84a2342f4 Log a message when "ixfr-from-differences" is set for an inline-signed zone
For inline-signed zones, the value of "ixfr-from-differences" is
hardcoded to:

  - "yes" for the raw version of the zone,
  - "no" for the signed version of the zone.

In other words, any user-provided "ixfr-from-differences" setting is
effectively ignored for an inline-signed zone.  Ensure the user is aware
of that by adding a note to the ARM and logging a message when an
"ixfr-from-differences" option is found at the zone level.

(cherry picked from commit 087157d14f)
2018-08-24 10:24:46 +02:00
Mark Andrews
56f8303377 when filter-aaaa and dns64 are both configured a assertion failure could occur
(cherry picked from commit 1056376d10)
2018-08-24 10:33:33 +10:00
Ondřej Surý
e37e27c560 Update lwres to use stdint types to finish transition to using stdint types 2018-08-22 09:04:02 +02:00
Ondřej Surý
8305d846bd Fix !!validate typo to -> !validate
(cherry picked from commit bdc9860262)
2018-08-11 10:24:54 +02:00
Ondřej Surý
1084b40b44 Replace custom isc_boolean_t with C standard bool type
(cherry picked from commit 994e656977)
(cherry picked from commit 884929400c)
2018-08-10 15:20:57 +02:00
Ondřej Surý
aaa76dc654 Replace custom isc_u?intNN_t types with C99 u?intNN_t types
(cherry picked from commit cb6a185c69)
(cherry picked from commit d61e6a3111)
2018-08-10 15:20:57 +02:00
Ondřej Surý
bfc6a25f2d Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants
(cherry picked from commit 64fe6bbaf2)
(cherry picked from commit c863a076ae)
2018-08-10 15:20:57 +02:00
Ondřej Surý
b9aa411750 Revert "Use make automatic variables to install updated manuals"
This reverts commit 77e9d82e1f.
2018-08-06 12:54:23 +02:00
Mark Andrews
7e6f7a5e2b turn off ixfr-from-differences on signed instance of in-line zone
(cherry picked from commit cfccd8d246)
2018-08-02 14:27:41 +10:00
Mark Andrews
94ca5cdfd6 rename zone to mayberaw
(cherry picked from commit 3ea9861e7a)
2018-08-02 14:27:41 +10:00
Petr Menšík
77e9d82e1f Use make automatic variables to install updated manuals
Make will choose modified manual from build directory or original from source
directory automagically. Take advantage of install tool feature.
Install all files in single command instead of iterating on each of them.

(cherry picked from commit 88f913ac81)
2018-08-01 16:29:11 +10:00
Michał Kępień
11d79a0fec Fix handling of TAT sending failures
dns_view_zonecut() may associate the dns_rdataset_t structure passed to
it even if it returns a result different then ISC_R_SUCCESS.  Not
handling this properly may cause a reference leak.  Fix by ensuring
'nameservers' is cleaned up in all relevant failure modes.

(cherry picked from commit f4b403e8b2)
2018-07-19 18:05:42 +02:00
Michał Kępień
d4a6cb321b Send upstream TAT queries for locally served zones
Trying to resolve a trust anchor telemetry query for a locally served
zone does not cause upstream queries to be sent as the response is
determined just by consulting local data.  Work around this issue by
calling dns_view_findzonecut() first in order to determine the NS RRset
for a given domain name and then passing the zone cut found to
dns_resolver_createfetch().

Note that this change only applies to TAT queries generated by the
resolver itself, not to ones received from downstream resolvers.

(cherry picked from commit 873c091408)
2018-07-11 09:14:11 +02:00
Michał Kępień
4fdd248f53 Extract TAT QNAME preparation to a separate function
Extract the part of dotat() reponsible for preparing the QNAME for a TAT
query to a separate function in order to limit the number of local
variables used by each function and improve code readability.

Rename 'name' to 'origin' to better convey the purpose of that variable.

(cherry picked from commit 2e7dd0d61f)
2018-07-11 09:14:09 +02:00
Mark Andrews
40cfb519f6 use extracted netaddr rather than client->destaddr
(cherry picked from commit 69fd3f5ba4)
2018-07-10 18:29:30 -07:00
Mark Andrews
b2ccc58206 fix category trust-anchor-telemetry spelling 2018-07-10 18:11:02 -07:00
Mark Andrews
6fbbe4ef7e free rbuf
(cherry picked from commit ecb2f20324)
2018-07-10 14:38:05 +10:00
Tinderbox User
3bbd725a2c prep 9.11.4rc2 2018-06-28 05:07:42 +00:00
Mukund Sivaraman
49cd7552be return FORMERR when question section is empty if COOKIE is not present
(cherry picked from commit 06d3106002)
(cherry picked from commit ed29b84e16)
2018-06-26 14:44:18 -07:00
Mark Andrews
c45fb6d92a CHANGES, copyright
(cherry picked from commit f7d346357e)
2018-06-26 10:55:44 -07:00
Michał Kępień
4b0129f34b Only request permitted capabilities in non-libcap builds
While libcap-enabled builds check whether any capability named requests
is within the permitted capability set, non-libcap builds just try
requesting them, which potentially causes a misleading error message to
be output ("Operation not permitted: please ensure that the capset
kernel module is loaded").  Ensure non-libcap builds also check whether
any requested capability is within the permitted capability set.

(cherry picked from commit 8c66f32e53)
2018-06-26 13:19:58 +02:00
Mark Andrews
ffc58bede6 log the remaining -V info at startup 2018-06-25 15:18:18 -07:00
Mark Andrews
d3982afe5c the client cookie was being hashed twice when computing the server cookie for sha1 and sha256
(cherry picked from commit 4795f0ca89)
2018-06-22 17:45:32 +10:00
Evan Hunt
a1690b24bc prepare 9.11.4rc1 2018-06-21 18:54:43 +02:00