Commit graph

2036 commits

Author SHA1 Message Date
Tony Finch
660c9af77b cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate
Use them in structs for various rdata types where they are missing.
This doesn't change the structs since we are replacing explicit
uint8_t field types with aliases for uint8_t.

Use dns_dsdigest_t in library function arguments.

(cherry picked from commit 0f219714e1)
2019-03-08 22:25:27 +11:00
Matthijs Mekking
8f64928e2e Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key.

(cherry picked from commit b1d5411569ae10830b63f07560091193646cc739)
2019-02-20 19:54:20 -08:00
Matthijs Mekking
326d40ab08 allow TSIG key to be added to message structure after parsing
up until now, message->tsigkey could only be set during parsing
of the request, but gss-tsig allows one to be created afterward.

(cherry picked from commit 879fc0285e)
2019-01-30 12:34:02 -08:00
Witold Kręcicki
aa9866c390 If possible don't use forwarders when priming the resolver.
If we try to fetch a record from cache and need to look into
hints database we assume that the resolver is not primed and
start dns_resolver_prime(). Priming query is supposed to return
NSes for "." in ANSWER section and glue records for them in
ADDITIONAL section, so that we can fill that info in 'regular'
cache and not use hints db anymore.
However, if we're using a forwarder the priming query goes through
it, and if it's configured to return minimal answers we won't get
the addresses of root servers in ADDITIONAL section. Since the
only records for root servers we have are in hints database we'll
try to prime the resolver with every single query.

This patch adds a DNS_FETCHOPT_NOFORWARD flag which avoids using
forwarders if possible (that is if we have forward-first policy).
Using this flag on priming fetch fixes the problem as we get the
proper glue. With forward-only policy the problem is non-existent,
as we'll never ask for root server addresses because we'll never
have a need to query them.

Also added a test to confirm priming queries are not forwarded.

(cherry picked from commit b49310ac06)
(cherry picked from commit f8963ad70e)
2019-01-16 22:27:52 -08:00
Matthijs Mekking
040e132f16 Allow unsupported alg in zone /w dnssec-signzone
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.  Current behavior is that it will
fail, hitting a fatal error.  The fix detects unsupported algorithms
and will not try to add it to the keylist.

Also when determining the maximum iterations for NSEC3, don't take
into account DNSKEY records in the zonefile with an unsupported
algorithm.

(cherry picked from commit 1dd11fc754)
2018-12-20 04:50:08 -05: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
c0a3c48802 add missing DBC checks for catz and add isc_magic checks; add DBC checks to ht.c
(cherry picked from commit a487473fc5)
(cherry picked from commit 17d9fa3cc7)
2018-11-29 15:05:17 +11:00
Mark Andrews
e409b8c698 free tmpzonename and restart_master
(cherry picked from commit 50714a9b35)
2018-11-14 11:42:44 -08:00
Mark Andrews
b2ffe56fc5 add krb5-selfsub and ms-selfsub
(cherry picked from commit fbeefd4990)
2018-09-10 17:40:19 +10:00
Ondřej Surý
d20fd7b109 Remove excessive inclusion of isc/refcount.h from various header files 2018-09-07 16:55:22 +02:00
Ondřej Surý
94a1c85366 Add C++ declarations to dns/fixedname.h 2018-09-05 18:00:32 -04:00
Ondřej Surý
302cae89f3 Bail-out early in the for install loops instead of continuing because for masks the error in the middle
(cherry picked from commit 25248eb097)
(cherry picked from commit 3fbceba0a8)
2018-09-03 13:49:35 +02: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
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
Mark Andrews
078962a616 fix spelling of 'telemetry'
(cherry picked from commit 4f18b6a09a)
2018-07-10 18:30:45 -07:00
Mark Andrews
09776e3e54 Declare the 'rdata' argument for dns_rdata_tostruct() to be const
(cherry picked from commit abb2fd1027)
2018-06-15 08:52:41 +02:00
Michał Kępień
4fab6fec76 Add dns_zone_logv()
Add a new libdns function, dns_zone_logv(), which takes a single va_list
argument rather than a variable number of arguments and can be used as a
base for implementing more specific zone logging functions.

(cherry picked from commit bb2dfb3f49)
2018-06-11 12:50:25 +02:00
Mark Andrews
9a5f308287 add named.conf option root-key-sentinel
(cherry picked from commit 68e9315c7d)
(cherry picked from commit ee763ef281)
2018-06-04 17:41:22 -04:00
Ondřej Surý
188526f41c Remove $Id markers, Principal Author and Reviewed tags from the full source tree
(cherry picked from commit 55a10b7acd)
2018-05-11 14:25:15 +02:00
Evan Hunt
7f61e9d50e add header guards in files that were missing them
(cherry picked from commit 4247477b61)
2018-04-22 12:58:27 -07:00
Mukund Sivaraman
1dea0795d1 Add a dns_fixedname_initname() helper function
This also turns the dns_fixedname macros into functions.

(cherry picked from commit 0d2a03c290)
(cherry picked from commit cee4fef7c5)
2018-04-10 13:14:25 -07:00
Evan Hunt
09cf48603a update file headers 2018-03-15 18:38:48 -07:00
Evan Hunt
8b205089b7 update file headers to remove copyright years 2018-03-14 16:40:20 -07:00
Tinderbox User
fccc836ebf update copyright notice / whitespace 2018-02-07 23:48:20 +00:00
Mark Andrews
8f1ed05dc0 4885. [security] update-policy rules that otherwise ignore the name
field now require that it be set to "." to ensure
                        that any type list present is properly interpreted.
                        [RT #47126]

(cherry picked from commit ec771bbdc8)
2018-02-07 13:50:00 +11:00
Tinderbox User
a853d87fc4 update copyright notice / whitespace 2018-01-13 23:48:14 +00:00
Mukund Sivaraman
929329d2d6 Fix various bugs reported by valgrind --tool=memcheck (#46978)
(cherry picked from commit f96133826e)
(cherry picked from commit 0374e1c3fd)
2018-01-13 11:47:46 +05:30
Michał Kępień
81e3e30849 [v9_11] Fix LMDB support on OpenBSD; clean up and refactor LMDB-related code
4835.   [cleanup]       Clean up and refactor LMDB-related code. [RT #46718]

4834.   [port]          Fix LMDB support on OpenBSD. [RT #46718]

(cherry picked from commit 2c20fc0d13)
2017-11-30 14:34:43 +01:00
Mark Andrews
3ed16e796d 4817. [cleanup] Use DNS_NAME_INITABSOLUTE and DNS_NAME_INITNONABSOLUTE.
[RT #45433]

(cherry picked from commit 3d905e0533)
2017-11-13 17:16:31 +11:00
Evan Hunt
6acd7b903b [v9_11] clean up DNS_MESSAGETEXTFLAG comments
(cherry picked from commit 89d1777560)
2017-10-25 21:34:09 -07:00
Tinderbox User
66ebd200f5 update copyright notice / whitespace 2017-10-25 23:50:03 +00:00
Evan Hunt
7c442d7fe0 [v9_11] log when update-policy local gets a key match from a remote host
4788.	[cleanup]	When using "update-policy local", log a warning
			when an update matching the session key is received
			from a remote host. [RT #46213]

- this completes change #4762.
2017-10-25 00:59:17 -07:00
Michał Kępień
5e1ca7a326 [v9_11] Rename nsec3param_salt_totext() to dns_nsec3param_salttotext(), make it public, add unit tests
4786.	[cleanup]	Turn nsec3param_salt_totext() into a public function,
			dns_nsec3param_salttotext(), and add unit tests for it.
			[RT #46289]

(cherry picked from commit 910a01550a)
2017-10-25 09:50:33 +02:00
Tinderbox User
ff2d95be3d update copyright notice / whitespace 2017-10-19 23:46:54 +00:00
Mark Andrews
659b66eb54 s/REQUIRE/ISC_REQUIRE/; include <isc/assertions.h> if ISC_REQUIRE is used; include <isc/likely.h> if ISC_{UN}LIKELY is used
(cherry picked from commit 0fab171196)
2017-10-19 16:47:23 +11:00
Mark Andrews
f44202ab64 4774. [bug] <isc/util.h> was incorrectly included in several
header files. [RT #46311]

(cherry picked from commit fe79e2efbf)
2017-10-19 12:32:53 +11:00
Tinderbox User
3d5ed84c6f update copyright notice / whitespace 2017-10-17 23:49:26 +00:00
Michał Kępień
ad9772c559 [v9_11] Doxygen fixes and cleanups
4773.	[doc]		Fixed generating Doxygen documentation for functions
			annotated using certain macros.  Miscellaneous
			Doxygen-related cleanups. [RT #46276]

(cherry picked from commit 2361003a88)
2017-10-17 06:58:05 +02:00
Tinderbox User
b22915c279 update copyright notice / whitespace 2017-10-11 23:46:26 +00:00
Mark Andrews
55ed351e81 reserve subscription flags
(cherry picked from commit a9a983781e)
2017-10-12 09:20:18 +11:00
Evan Hunt
5d7d67f82a [v9_11] ignore cache when sending 5011 refresh queries
4771.	[bug]		When sending RFC 5011 refresh queries, disregard
			cached DNSKEY rrsets. [RT #46251]

(cherry picked from commit b2597ce86b)
2017-10-11 14:24:52 -07:00
Tinderbox User
8a99b24dbe update copyright notice / whitespace 2017-10-06 23:46:41 +00:00
Evan Hunt
f592d2f76c [v9_11] further restrict update-policy local
4762.	[func]		"update-policy local" is now restricted to updates
                from local addresses. (Previously, other addresses
                were allowed so long as updates were signed by the
                local session key.) [RT #45492]
2017-10-06 15:43:18 -07:00
Mark Andrews
1c8aa38b53 4759. [func] Add logging channel "trust-anchor-telementry" to
record trust-anchor-telementry in incoming requests.
                            Both _ta-XXXX.<anchor>/NULL and EDNS KEY-TAG options
                            are logged.  [RT #46124]

    (cherry picked from commit b41c1aacbc)
2017-10-06 13:53:50 +11:00
Tinderbox User
649482995b update copyright notice / whitespace 2017-10-05 23:46:27 +00:00
Mark Andrews
2732d4922c 4754. [bug] dns_zone_setview needs a two stage commit to properly
handle errors. [RT #45841]
2017-10-05 13:41:49 +11:00
Evan Hunt
d5bd8bb71a [v9_11] de-DLV
4749.	[func]		The ISC DLV service has been shut down, and all
			DLV records have been removed from dlv.isc.org.
			- Removed references to ISC DLV in documentation
			- Removed DLV key from bind.keys
			- No longer use ISC DLV by default in delv
			[RT #46155]
2017-10-03 00:43:19 -07:00
Tinderbox User
acce4b333d update copyright notice / whitespace 2017-09-18 23:52:43 +00:00
Michał Kępień
62f2fefaec [v9_11] Prevent possible infinite signing loop after retransferring an inline-signed slave using NSEC3
4727.	[bug]		Retransferring an inline-signed slave using NSEC3
			around the time its NSEC3 salt was changed could result
			in an infinite signing loop. [RT #45080]

(cherry picked from commit f665c724e4)
2017-09-18 09:23:18 +02:00