Commit Graph

83 Commits

Author SHA1 Message Date
Mukund Sivaraman
ed29b84e16 return FORMERR when question section is empty if COOKIE is not present
(cherry picked from commit 06d3106002)
2018-06-26 14:36:34 -07:00
Mark Andrews
77496f0b88 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:02 +10:00
Evan Hunt
87344e3493 prepare 9.12.1rc1 2018-06-21 18:46:32 +02:00
Evan Hunt
86787d0ad1 ensure that we attempt to validate glue if it's signed
- incidentally fixed a bug in the dnssec system test where TTLs in the
  answer section rather than the additional section were being checked

(cherry picked from commit 8d923a05a9)
2018-06-08 11:49:34 -07:00
Mukund Sivaraman
2930507357 Add a answer-cookie named config option 2018-06-08 16:34:29 +10:00
Mark Andrews
69340b5ac5 add support -T sigvalinsecs
(cherry picked from commit 87a3dc8ab9)
2018-06-06 17:05:43 +10:00
Tony Finch
c4494458ae Move serve-stale logging to its own category, so that its verbosity can be curtailed.
(cherry picked from commit 4b442c309d)
2018-05-28 17:25:38 -07:00
Evan Hunt
61de568197 copyrights 2018-05-23 09:52:09 -07:00
Evan Hunt
3de0910bc7 Detect recursion loops during query processing
Interrupt query processing when query_recurse() attempts to ask the same
name servers for the same QNAME/QTYPE tuple for two times in a row as
this indicates that query processing may be stuck for an indeterminate
period of time, e.g. due to interactions between features able to
restart query_lookup().

(cherry picked from commit d1de99bc587480eb51a38b23c8aaf4d34c0c92d2)
2018-05-21 09:59:41 -07:00
Mukund Sivaraman
753d0aee03 Don't validate non-pending glue when adding to the additional section
(cherry picked from commit 31bd3147d1)
2018-05-16 08:29:25 +02:00
Ondřej Surý
c35de9b383 Remove $Id markers, Principal Author and Reviewed tags from the full source tree
(cherry picked from commit 55a10b7acd)
2018-05-11 14:19:35 +02:00
Michał Kępień
6e26fab6b8 Address GCC 8 -Wformat-truncation warnings
(cherry picked from commit 172d0c401e)
2018-05-10 10:52:00 +02:00
Mark Andrews
ee763ef281 add named.conf option root-key-sentinel
(cherry picked from commit 68e9315c7d)
2018-04-22 12:46:03 -07:00
Mark Andrews
7111eff80c detect and processes root-key-sentinel labels.
(cherry picked from commit 8fc9f64df9)
2018-04-22 12:46:03 -07:00
Tony Finch
58aac41b7e dnstap: log actual local IPv6 address, not :: listening address
(cherry picked from commit ccff953c25)
2018-04-10 17:21:08 -07:00
Michał Kępień
0041aeb751 Use dns_fixedname_initname() where possible
Replace dns_fixedname_init() calls followed by dns_fixedname_name()
calls with calls to dns_fixedname_initname() where it is possible
without affecting current behavior and/or performance.

This patch was mostly prepared using Coccinelle and the following
semantic patch:

    @@
    expression fixedname, name;
    @@
    -	dns_fixedname_init(&fixedname);
    	...
    -	name = dns_fixedname_name(&fixedname);
    +	name = dns_fixedname_initname(&fixedname);

The resulting set of changes was then manually reviewed to exclude false
positives and apply minor tweaks.

It is likely that more occurrences of this pattern can be refactored in
an identical way.  This commit only takes care of the low-hanging fruit.

(cherry picked from commit 4df4a8e731)
2018-04-10 13:09:24 -07:00
Mark Andrews
573b33b6c2 check insist on every call; make conditional block constistent with rest of code
(cherry picked from commit f1def91625)
2018-03-07 12:32:17 -08:00
Michał Kępień
590f092e00 Fix MX checks for dynamic updates
The check_mx() function in lib/ns/update.c incorrectly tests whether the
DNS_RDATA_CHECKMX/DNS_RDATA_CHECKMXFAIL flags are set for each applied
MX record update as these flags are never set in code paths related to
dynamic updates; they can only be set when loading a zone from a master
file (DNS_ZONEOPT_CHECKMX -> DNS_MASTER_CHECKMX -> DNS_RDATA_CHECKMX).
This flaw allows MX records containing IP addresses to be added to a
zone even when "check-mx fail;" is used.

Ensure correct behavior by modifying the relevant tests in check_mx() so
that they use DNS_ZONEOPT_CHECKMX/DNS_ZONEOPT_CHECKMXFAIL instead.

(cherry picked from commit 857a40c87b)
2018-02-26 15:15:27 -08:00
Petr Menšík
eb5c7e91fa unit/unittest.sh is generated by configure. It will always be
generated into builddir. If out-of-tree build is used, make unit
will always fail. Kyuafiles and testdata still have to be copied
manually into the builddir.

(cherry picked from commit 95cde3608a)
2018-02-23 15:45:19 -08:00
Ondřej Surý
557a5c3f78 Update license headers to not include years in copyright in all applicable files
(cherry picked from commit 843d389661)
2018-02-23 10:38:02 +01:00
Mark Andrews
14e5f05a5e use %u instead of %d 2018-02-16 14:08:26 +11:00
Evan Hunt
988f5de10a [v9_12] prep 9.12.1b1 2018-02-08 13:47:56 -08:00
Tinderbox User
4c0adf3d56 update copyright notice / whitespace 2018-02-05 23:47:17 +00:00
Michał Kępień
5c33d89ff1 [v9_12] Prevent crashing due to a race during server shutdown
4884.	[bug]		named could crash on shutdown due to a race between
			shutdown_server() and ns__client_request(). [RT #47120]

(cherry picked from commit af1937c35a)
2018-02-05 20:25:41 +01:00
Mark Andrews
33132cbfc8 4880. [bug] Named wasn't returning the target of a cross zone
CNAME between to served zones when recursion was
                        desired and available (RD=1, RA=1). Don't return
                        the CNAME target otherwise to prevent accidental
                        cache poisoning. [RT #47078]

(cherry picked from commit d26f90241d)
2018-01-30 13:12:18 +11:00
Tinderbox User
6774dbb0ab update copyright notice / whitespace 2018-01-22 23:46:35 +00:00
Mukund Sivaraman
c8eb726046 Don't permit loading meta RR types such as TKEY from master files (#47009)
(cherry picked from commit 8a4ce20172)
2018-01-22 14:31:05 +05:30
Mark Andrews
9bc567aad7 silence clang static analyser warning. [RT #46881]
(cherry picked from commit af034ef188)
2018-01-22 09:48:37 +11:00
Tinderbox User
b1ef8c1d9c update copyright notice / whitespace 2018-01-15 23:46:48 +00:00
Mark Andrews
f4c1681dad silence coverity false positive. [RT #46841]
(cherry picked from commit fa22351a7c)
2018-01-15 12:03:24 +11:00
Tinderbox User
eee54aab6e update copyright notice / whitespace 2018-01-12 23:46:21 +00:00
Mukund Sivaraman
0374e1c3fd Fix various bugs reported by valgrind --tool=memcheck (#46978)
(cherry picked from commit f96133826e)
2018-01-13 00:37:28 +05:30
Mark Andrews
f09733999c test devent->sigrdataset rather than devent->rdataset before calling query_putrdataset
(cherry picked from commit 67faaa41c9)
2018-01-05 12:39:19 +11:00
Mark Andrews
0ed1d4154d use RESTORE rather than SAVE as is better describes the operation
(cherry picked from commit 9e6b394410)
2018-01-04 13:12:09 +11:00
Mark Andrews
749598d94f 4857. [bug] Maintain attach/detach semantics for event->db,
event->node, event->rdataset and event->sigrdataset
                        in query.c. [RT #46891]

(cherry picked from commit eed2f6cef0)
2018-01-04 10:51:27 +11:00
Tinderbox User
99a488899e update copyright notice / whitespace 2018-01-02 23:45:46 +00:00
Mark Andrews
be2380edf9 4854. [bug] query_synthcnamewildcard should stop generating the
response if query_synthwildcard fails. [RT #46939]

(cherry picked from commit c9ee9718ae)
2018-01-03 10:08:16 +11:00
Tinderbox User
251446d350 regen v9_12 2017-12-29 02:16:29 +00:00
Evan Hunt
2f855055ed [master] prep 9.12.0rc1 2017-11-30 14:39:16 -08:00
Mark Andrews
14e9925868 add missing entries to .def files [RT #46215] 2017-11-27 13:49:39 +11:00
Mark Andrews
3d905e0533 4817. [cleanup] Use DNS_NAME_INITABSOLUTE and DNS_NAME_INITNONABSOLUTE.
[RT #45433]
2017-11-13 16:58:12 +11:00
Mark Andrews
c0e3e1fe44 4813. [bug] Address potential read after free errors from
query_synthnodata, query_synthwildcard and
                        query_synthnxdomain. [RT #46547]
2017-11-10 13:33:18 +11:00
Mark Andrews
b231ddc65d fix the IPv6 address length in compute_cookie. [RT #46538] 2017-11-09 23:59:20 +11:00
Mukund Sivaraman
7e1df5182c [master] isc_rng_randombytes()
4807.	[cleanup]	isc_rng_randombytes() returns a specified number of
			bytes from the PRNG; this is now used instead of
			calling isc_rng_random() multiple times. [RT #46230]
2017-11-06 10:44:37 -08:00
Evan Hunt
8d23105547 [master] prep 9.12.0b2 2017-11-02 11:50:07 -07:00
Evan Hunt
65314b0fd8 [master] "enable-filter-aaaa" no longer optional
4786.	[func]		The "filter-aaaa-on-v4" and "filter-aaaa-on-v6"
			options are no longer conditionally compiled.
			[RT #46340]
2017-10-25 00:33:51 -07:00
Evan Hunt
0207f6ff9e [master] omit NS from authority section if it was in answer
4780.	[bug]		When answering ANY queries, don't include the NS
			RRset in the authority section if it was already
			in the answer section. [RT #44543]
2017-10-23 19:16:27 -07:00
Mark Andrews
a59d687db4 4778. [test] Improve synth-from-dnssec testing. [RT #46352] 2017-10-24 09:49:07 +11:00
Michał Kępień
34ee1cdb56 [master] Extend hooks documentation 2017-10-23 14:17:44 +02:00
Michał Kępień
6853af8fc5 [master] Deconstify hook tables as replacing single entries is allowed 2017-10-23 14:17:07 +02:00