Michał Kępień
ab4c911629
Fix cppcheck 1.90 warning
...
cppcheck 1.90 reports the following issue for bin/named/query.c:
bin/named/query.c:6838:2: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
snprintf(mbuf, sizeof(mbuf) - 1,
^
Tweak the format specifier for client->query.restarts to address the
problem.
2020-03-04 12:41:01 +01:00
Evan Hunt
191b616579
fix additional spelling errors
2020-02-24 22:04:43 -08:00
Evan Hunt
e63223332c
fix spelling errors reported by Fossies.
2020-02-21 14:09:59 -08:00
Ondřej Surý
7f0152632f
lib/ns/query.c: Fix invalid order of DbC checks that could cause dereference before NULL check
...
(cherry picked from commit d1f035bbba )
2019-10-03 14:21:47 +02:00
Michał Kępień
4e266a810e
Tweak buffer sizes to prevent compilation warnings
...
For some libc implementations, BUFSIZ is small enough (e.g. 1024 for
musl libc) to trigger compilation warnings about insufficient size of
certain buffers. Since the relevant buffers are used for printing DNS
names, increase their size to '(n + 1) * DNS_NAME_FORMATSIZE', where 'n'
is the number of DNS names which are printed to a given buffer. This
results in somewhat arbitrary, albeit nicely-aligned and large enough
buffer sizes.
(cherry picked from commit 3384455659 )
2019-07-30 22:22:28 +02:00
Mark Andrews
de153f1a43
Do not attempt to perform a DNS64 rewrite if RPZ returns NODATA.
...
(cherry picked from commit 1eb640049c )
2019-07-25 07:26:35 +10:00
Evan Hunt
ff4855d358
allow glue in authoritative responses to root priming queries
...
- when processing authoritative queries for ./NS, set 'gluedb' so
that glue will be included in the response, regardless of how
'minimal-responses' has been configured.
(cherry picked from commit e7684c7b64 )
2019-06-26 09:27:22 -07:00
Witold Kręcicki and Ondřej Surý
4b246002be
Make sure that recursclient gauge is calculated correctly.
...
We increase recursclients when we attach to recursion quota,
decrease when we detach. In some cases, when we hit soft
quota, we might attach to quota without increasing recursclients
gauge. We then decrease the gauge when we detach from quota,
and it causes the statistics to underflow.
Fix makes sure that we increase recursclients always when we
succesfully attach to recursion quota.
2019-06-26 11:10:42 +02:00
Mark Andrews and Evan Hunt
93ee793d97
use client->query.qname
...
(cherry picked from commit 8758d36a5e )
2019-03-11 11:27:45 -07:00
Mark Andrews and Ondřej Surý
e5e1957a8f
use typebuf and classbuf
2018-12-11 12:26:25 +01:00
Mark Andrews and Ondřej Surý
dc49ce1cd0
log RPZ type and class
...
(cherry picked from commit 28442f11f0 )
2018-12-11 06:24:08 -05:00
Mark Andrews and Evan Hunt
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
Mark Andrews
f4bea4002a
check requireservercookie even if rrl is configured
...
(cherry picked from commit d6f6eeda9d )
2018-11-06 10:33:32 +11: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
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ý
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
Mark Andrews and Evan Hunt
40cfb519f6
use extracted netaddr rather than client->destaddr
...
(cherry picked from commit 69fd3f5ba4 )
2018-07-10 18:29:30 -07:00
Evan Hunt
7a00ce2e77
ensure we try to validate glue records so RRSIG TTLs will be capped
2018-06-08 11:41:48 -07:00
Mark Andrews and Evan Hunt
9448c4fd21
add system test for root-key-sentinel
...
(cherry picked from commit a23b305e6b )
(cherry picked from commit b9e6b124aa )
2018-06-04 17:41:22 -04:00
Mark Andrews and Evan Hunt
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
Mark Andrews and Evan Hunt
afa97c6552
detect and process root-key-sentinel labels.
...
(cherry picked from commit 8fc9f64df9 )
(cherry picked from commit 7111eff80c )
2018-06-04 17:41:21 -04:00
Evan Hunt and Mark Andrews
32681598cd
attempt to validate glue, but don't drop it if it can't be validated
2018-06-04 01:12:18 -04:00
Mukund Sivaraman and Mark Andrews
22ff9c9199
Fix acache case too
2018-06-04 01:12:18 -04:00
Mukund Sivaraman and Mark Andrews
3f59d6c251
Don't validate non-pending glue when adding to the additional section
...
(cherry picked from commit 31bd3147d1 )
2018-06-04 01:12:18 -04:00
Michał Kępień and Evan Hunt
ecea678dac
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 )
(cherry picked from commit 0041aeb751 )
2018-04-10 13:26:23 -07:00
Evan Hunt
8b205089b7
update file headers to remove copyright years
2018-03-14 16:40:20 -07:00
Mark Andrews
e08a31e317
test devent->sigrdataset rather than devent->rdataset before calling query_putrdataset
2018-01-05 12:40:36 +11:00
Tinderbox User
dc2a85bed7
update copyright notice / whitespace
2018-01-04 23:46:19 +00:00
Mark Andrews
cad79077bd
4857. [bug] Maintain attach/detach semantics for event->db,
...
event->node, event->rdataset and event->sigrdataset
in query.c. [RT #46891 ]
2018-01-04 13:07:51 +11: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
4d39bffd95
[v9_11] fix merge error; missing hunk from change 4780
2017-10-24 10:09:22 -07:00
Evan Hunt
b7b76d6b85
[v9_11] 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:33:14 -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
Mark Andrews
d72952cf25
4739. [cleanup] Address clang static analysis warnings. [RT #45952 ]
...
(cherry picked from commit f9f3f20d2d )
2017-09-27 10:58:44 +10:00
Evan Hunt
68d7ff133c
[v9_11] backport rpz tweaks
...
4713. [cleanup] Minor revisions to RPZ code to reduce
differences with the development branch. [RT #46037 ]
2017-09-26 11:02:59 -07:00
Evan Hunt
031bc55634
[v9_11] turn on minimal responses for CDS/CDNSKEY
...
4678. [cleanup] Turn on minimal responses for CDNSKEY and CDS in
addition to DNSKEY and DS. Thanks to Tony Finch.
[RT #45690 ]
(cherry picked from commit 391a3a2f20 )
2017-08-25 13:32:18 -07:00
Evan Hunt
7dbeb5e7f0
[v9_11] silence gcc 7 warnings
...
4673. [port] Silence GCC 7 warnings. [RT #45592 ]
(cherry picked from commit cdacec1dcb )
2017-08-09 00:24:16 -07:00
Mark Andrews
b2e7185306
4640. [bug] If query_findversion failed in query_getdb due to
...
memory failure the error status was incorrectly
discarded. [RT #45331 ]
(cherry picked from commit b551ee14bd )
2017-06-23 17:18:23 +10:00
Mukund Sivaraman
3a58e1fefb
Don't log NSDNAME failures as NSIP ( #45052 )
...
(cherry picked from commit 2c11da8441 )
2017-06-12 14:11:32 +05:30
Evan Hunt
3440cf9c60
[v9_11] fix rpz formerr loop
...
4531. [security] Some RPZ configurations could go into an infinite
query loop when encountering responses with TTL=0.
(CVE-2017-3140) [RT #45181 ]
2017-05-30 12:35:06 -07:00
Evan Hunt
fb9ef31fed
[v9_11] Add DLZ db version to activeversions
...
4628. [bug] Fixed a potential reference leak in query_getdb().
[RT #45247 ]
(cherry picked from commit 594eadcc34 )
2017-05-28 14:29:58 -07:00
Mark Andrews
0b18154e45
remove unused assignments [RT #45147 ]
...
(cherry picked from commit 78551a3f2c )
2017-05-03 07:46:21 +10:00
Mukund Sivaraman
fec9247b8f
Validate glue before adding it to the additional section ( #45062 )
...
(cherry picked from commit b0dbcba2d2 )
2017-04-21 15:46:07 +05:30
Mark Andrews
b81977ae70
4575. [security] Dns64 with break-dnssec yes; can result in a
...
assertion failure. (CVE-2017-3136) [RT #44653 ]
(cherry picked from commit 3bce12e4b6 )
2017-02-15 12:22:53 +11:00
Mark Andrews
22e3ffcf2c
4556. [security] Combining dns64 and rpz can result in dereferencing
...
a NULL pointer (read). (CVE-2017-3135) [RT#44434]
(cherry picked from commit 5abe80ef13 )
2017-01-24 09:54:54 +11:00
Tinderbox User
2f4e3e45d6
update copyright notice / whitespace
2017-01-19 23:46:07 +00:00