]>
git.ipfire.org Git - thirdparty/knot-resolver.git/log
Tomas Krizek [Wed, 25 Apr 2018 14:42:06 +0000 (16:42 +0200)]
distro/arch: create debug symbols pkg
Tomas Krizek [Wed, 25 Apr 2018 09:49:50 +0000 (11:49 +0200)]
distro/arch: don't overwrite kresd.conf by default
Vladimír Čunát [Mon, 23 Apr 2018 16:01:08 +0000 (18:01 +0200)]
Merge !551: misc changes from Marek
Marek Vavruša [Mon, 9 Apr 2018 07:01:53 +0000 (00:01 -0700)]
iterate: allow lame negative answers in PERMISSIVE mode
Some nameservers are hopelessly broken (ns1-ord.salesforce.com),
and will return lame negative answers which will flag the nameserver
as bad, so it wouldn't be picked for valid queries.
Marek Vavruša [Fri, 6 Apr 2018 20:25:21 +0000 (13:25 -0700)]
copy transitive query flags when CNAME chasing
This is an issue for things like disabling minimisation, which only works
for the original query and not for the CNAME target.
Marek Vavruša [Fri, 6 Apr 2018 05:43:57 +0000 (22:43 -0700)]
check per-query flags instead of global options, getter for NS name
Checking query flags instead of global context option allows setting
overrides on individual queries. The effect is the same as query flags
start by copying request flags which start by copying context options.
Marek Vavruša [Fri, 6 Apr 2018 05:48:51 +0000 (22:48 -0700)]
add bindings for the checkout layer
This one was missing from the current bindings. The checkout layer
runs when the worker attempts to send a DNS query to given upstream
when the address is already determined. The layer can add EDNS options
or update outbound query, or block particular addresses / protocol.
Marek Vavruša [Tue, 3 Apr 2018 22:51:32 +0000 (15:51 -0700)]
lua: added typecheck for string-to-dname conversion
Vladimír Čunát [Mon, 23 Apr 2018 12:44:12 +0000 (14:44 +0200)]
Merge !519: Restore cache insert RR API
Closes #332.
Marek Vavruša [Fri, 23 Mar 2018 16:40:36 +0000 (09:40 -0700)]
cache: restore flagging entries written into cache
This was probably lost during the cache backend rewrite in 2.x
fixes #332
Marek Vavruša [Thu, 22 Mar 2018 18:06:43 +0000 (11:06 -0700)]
kres: added missing nil check for dname2str
Marek Vavruša [Thu, 15 Mar 2018 23:13:47 +0000 (16:13 -0700)]
kres: added interface for RR set wire size and packet remaining bytes
Marek Vavruša [Thu, 15 Mar 2018 22:46:55 +0000 (15:46 -0700)]
kres: preserve error code value along with the text explanation
Wrapping the error code in a structure preserves both the numeric value
and the ability to convert it into textual format.
Marek Vavruša [Thu, 15 Mar 2018 21:38:43 +0000 (14:38 -0700)]
kres: added rr:rdcount() and tests
Marek Vavruša [Fri, 16 Mar 2018 02:27:59 +0000 (19:27 -0700)]
lib/utils: fixed memory corruption in kr_pkt_recycle and kr_pkt_clear_payload
Previous implementation forgot to clear the compression table, which is
an internal structure to packet. So when a recycled packet was reused,
it compared owners of newly inserted records with dangling pointers left
in the compression table.
This is less of a problem in query processing,
as each packet uses a memory pool, so the pointed names were never deallocated,
but it would write out wrong compression pointers because the compression
table kept pointing into packet that was now cleared and reused for something else.
It is more of a problem with packets created without a memory pool,
as the compression table kept references to memory that was already freed.
Marek Vavruša [Thu, 15 Mar 2018 05:54:42 +0000 (22:54 -0700)]
kres: cleanup, added typechecks where missing
Marek Vavruša [Wed, 14 Mar 2018 21:13:33 +0000 (14:13 -0700)]
kres: added rr:merge_data(source) for RR merging
This is generally useful for parsing records from packet, as they
are broken into individual RRs that need reassembling.
Marek Vavruša [Mon, 12 Mar 2018 04:13:05 +0000 (21:13 -0700)]
kres: add insert and sync interfaces to the cache metatype
This adds metatype wrappers for kr_cache_insert_rr and kr_cache_sync
for the cache metatype, and tests.
Marek Vavruša [Mon, 12 Mar 2018 04:12:39 +0000 (21:12 -0700)]
kres: add constructor for rrsets and refactor rr2str function to use it
This updates the metatype to wrap knot_rrset_add_rdata and knot_rrset_init_empty
in a nicer way, and adds automatic GC destructor and tests.
Marek Vavruša [Wed, 14 Mar 2018 19:10:46 +0000 (12:10 -0700)]
cache: changed get_new_ttl private API to allow custom timestamp
Before the API depended on the qry object which only makes sense during
resolution of requests, not when manipulating cache out of it.
Vladimír Čunát [Mon, 23 Apr 2018 12:26:48 +0000 (14:26 +0200)]
cache: restored kr_cache_insert_rr API
This commit abstracts out stash_rrset from stash_rrarray_entry,
and fixes incrementing metrics on actual record insertion.
It then resurfaces kr_cache_insert_rr that was deleted in 2.0
using the extracted function.
vcunat separated stash_rrset_precond() later during rebase.
Vladimír Čunát [Mon, 23 Apr 2018 11:08:03 +0000 (13:08 +0200)]
Merge !565: changes from security repo
Closes #334 and #336
Vladimír Čunát [Mon, 23 Apr 2018 10:43:52 +0000 (12:43 +0200)]
NEWS: cleanup
- TLS errors were mentioned twice
- the option mode wasn't changed, just a static function name
Vladimír Čunát [Mon, 23 Apr 2018 10:43:07 +0000 (12:43 +0200)]
rfc7706: fixup links to modules
They didn't work locally for me, at least.
Petr Špaček [Mon, 23 Apr 2018 08:40:00 +0000 (10:40 +0200)]
Merge branch 'release-2-3-0' into 'master'
Release 2.3.0
Closes knot-resolver#334 and knot-resolver#336
See merge request knot/knot-resolver-security!3
Tomas Krizek [Fri, 13 Apr 2018 10:57:36 +0000 (12:57 +0200)]
release 2.3.0
Petr Špaček [Mon, 23 Apr 2018 08:18:21 +0000 (10:18 +0200)]
docs: document our position on RFC 7706
Vladimír Čunát [Fri, 20 Apr 2018 13:48:07 +0000 (15:48 +0200)]
lib/generic/pack: more NULL checks
Inspired by Marek's MR.
Grigorii Demidov [Thu, 19 Apr 2018 14:02:30 +0000 (16:02 +0200)]
daemon/worker: fix misplaced timer stop
fixup!
8ea37cc3 daemon/worker: robustness against the slow-lorris attack
Vladimír Čunát [Thu, 19 Apr 2018 12:28:22 +0000 (14:28 +0200)]
lib/generic/pack: fix a bug/inconsistency
The NULL is never tested, and it was breaking our usual iteration pattern.
Grigorii Demidov [Thu, 19 Apr 2018 08:55:17 +0000 (10:55 +0200)]
daemon/worker: fix missed deinitialization when processing erroneous TCP states
Grigorii Demidov [Wed, 18 Apr 2018 15:12:36 +0000 (17:12 +0200)]
daemon/worker: adjust tcp timeouts
This is an attempt to fix two problems:
1. kresd tries to close incoming TCP connection too early. This may lead
to multiple client reconnections. This problem primarily
affects TCP/TLS clients who send several queries over single TCP connection.
2. In certain circumstances outbound TCP connection doesn't timeout
despite that fact that upstream doesn't send back any answers.
This may lead to timeouts on non-problematic queries.
Petr Špaček [Fri, 13 Apr 2018 15:01:33 +0000 (17:01 +0200)]
Merge branch 'crache' into 'master'
Handle RRs with non-Internet class and meta-types
Closes knot-resolver#334
See merge request knot/knot-resolver-security!2
Vladimír Čunát [Wed, 4 Apr 2018 17:33:03 +0000 (19:33 +0200)]
cache: catch disallowed RR types at API entry points
Petr Špaček [Fri, 13 Apr 2018 14:52:39 +0000 (16:52 +0200)]
Merge branch 'cookie-qcount0' into 'master'
Refuse EDNS cookie requests if cookie module is missing
Closes knot-resolver#336
See merge request knot/knot-resolver-security!4
Vladimír Čunát [Wed, 4 Apr 2018 15:42:35 +0000 (17:42 +0200)]
iterate: only pick RRs from the IN class
Petr Špaček [Fri, 13 Apr 2018 14:43:50 +0000 (16:43 +0200)]
Merge branch 'slow-lorris' into 'master'
Protection against slowlorris attack on autoritative side
See merge request knot/knot-resolver-security!5
Grigorii Demidov [Thu, 5 Apr 2018 10:28:26 +0000 (12:28 +0200)]
lib/resolve: cleanup
Grigorii Demidov [Thu, 5 Apr 2018 09:12:31 +0000 (11:12 +0200)]
lib/resolve: accept incoming requests with QDCOUNT = 0 only if cookie module has loaded.
Grigorii Demidov [Fri, 13 Apr 2018 08:19:14 +0000 (10:19 +0200)]
daemon/worker: robustness against the slow-lorris attack
Petr Špaček [Fri, 20 Apr 2018 15:26:29 +0000 (17:26 +0200)]
Merge branch 'stale_verbose' into 'master'
serve_stale: log only in verbose mode
See merge request knot/knot-resolver!564
Petr Špaček [Fri, 20 Apr 2018 14:50:24 +0000 (16:50 +0200)]
serve_stale: log only in verbose mode
Tomas Krizek [Fri, 20 Apr 2018 14:43:27 +0000 (16:43 +0200)]
Merge branch 'packaging-update' into 'master'
distro/rpm: update dependency declarations to conform with pkg standards
See merge request knot/knot-resolver!563
Tomas Krizek [Fri, 20 Apr 2018 14:34:19 +0000 (16:34 +0200)]
distro/rpm: update dependency declarations to conform with pkg standards
Tomas Krizek [Fri, 20 Apr 2018 14:19:30 +0000 (16:19 +0200)]
Merge branch 'packaging-update' into 'master'
distro/deb: add prefill module
See merge request knot/knot-resolver!562
Tomas Krizek [Fri, 20 Apr 2018 13:57:33 +0000 (15:57 +0200)]
distro/deb: add prefill module
Petr Špaček [Fri, 20 Apr 2018 11:11:26 +0000 (13:11 +0200)]
Merge branch 'fromjson' into 'master'
export a JSON decode function to lua
See merge request knot/knot-resolver!560
Anbang Wen [Wed, 18 Apr 2018 20:37:42 +0000 (13:37 -0700)]
export a JSON decode function to lua
Since there is already a bundled JSON library, expose it to lua for
modules to use.
Petr Špaček [Thu, 19 Apr 2018 12:13:10 +0000 (14:13 +0200)]
Merge branch 'separate-tls-counter' into 'master'
daemon/worker: separate counter for TLS sendings
See merge request knot/knot-resolver!557
Grigorii Demidov [Fri, 13 Apr 2018 15:42:55 +0000 (17:42 +0200)]
daemon/worker: separate counter for TLS sendings
Petr Špaček [Wed, 18 Apr 2018 15:18:59 +0000 (17:18 +0200)]
Merge branch 'root-zone-import' into 'master'
root zone import implementation
See merge request knot/knot-resolver!511
Petr Špaček [Wed, 18 Apr 2018 12:33:42 +0000 (14:33 +0200)]
prefill: documentation
Petr Špaček [Wed, 18 Apr 2018 10:49:50 +0000 (12:49 +0200)]
prefill: replace CA directory path with CA file path
luasec internally calls SSL_CTX_load_verify_locations() which has
non-intuituve behavior for directories. Given that we already use path
to certificate file for TLS_FORWARD it is better to use consistent and
intuitive interface.
Petr Špaček [Wed, 18 Apr 2018 10:45:16 +0000 (12:45 +0200)]
prefill: mandate explicit URL configuration
Default values would cause confusion when we introduce support for
non-root zones.
Petr Špaček [Wed, 18 Apr 2018 07:46:28 +0000 (09:46 +0200)]
prefill: configation syntax for multiple zones
Only root zone can be imported (for now) but we want to
avoid changing syntax when support for other zones is added.
Petr Špaček [Mon, 16 Apr 2018 16:07:04 +0000 (18:07 +0200)]
prefill: import zone immediately after start
Delaying import would leak bunch of queries from the resolver between
moment of start and import.
Petr Špaček [Mon, 16 Apr 2018 16:03:05 +0000 (18:03 +0200)]
prefill: split into separate functions, handle daemon restart
The original prefill module did not import zone data after daemon
restart unless the file TTL was expired. The module now reuses data
on disk as long as TTL is not expired, and imports the zone after module
load.
Petr Špaček [Mon, 16 Apr 2018 11:59:56 +0000 (13:59 +0200)]
prefill: avoid rename syscall
An attempt to rename/move temporary file to its final destination will
fail if /tmp and working directory belong to different filesystems.
It seems that temporary file is not required so it easier to get rid of
it altogether.
Petr Špaček [Mon, 16 Apr 2018 11:59:04 +0000 (13:59 +0200)]
zimport: fix error reporting
Petr Špaček [Fri, 13 Apr 2018 19:24:00 +0000 (21:24 +0200)]
prefill: log delay before first refresh
Petr Špaček [Fri, 13 Apr 2018 18:04:11 +0000 (20:04 +0200)]
prefill: check that CA path is a directory, use name ca_dir for clarity
Petr Špaček [Fri, 13 Apr 2018 12:30:00 +0000 (14:30 +0200)]
prefill: mandate certificate verification
ca_path parameter is now required so the module does not do anything
until its config() method is called.
Petr Špaček [Fri, 13 Apr 2018 07:42:55 +0000 (09:42 +0200)]
prefill: rename local variables prefetch -> prefill
Grigorii Demidov [Tue, 6 Mar 2018 15:49:00 +0000 (16:49 +0100)]
daemon: cache prefill module
Grigorii Demidov [Fri, 2 Mar 2018 11:26:47 +0000 (12:26 +0100)]
lib/utils: merge kr_rrkey() and kr_rrkey2() functions
The old kr_rrkey() was used only on one place (and incorrectly) so now
we are replacing both copies with single implementation for general
resolver and root zone import.
It should not make any practical difference.
Grigorii Demidov [Tue, 27 Feb 2018 16:25:01 +0000 (17:25 +0100)]
daemon: root zone import
Petr Špaček [Wed, 18 Apr 2018 11:10:48 +0000 (13:10 +0200)]
Merge branch 'marek/fix-infinite-loop-on-send-error' into 'master'
worker: fixed infinite loop on send failure
See merge request knot/knot-resolver!559
Marek Vavruša [Sat, 14 Apr 2018 04:18:42 +0000 (21:18 -0700)]
worker: fixed infinite loop on send failure
The problem here is when qr_task_send() returns an error, the
following error handler will attempt to cancel all tasks that were
started on the same connection, but that will only work for the first
task (which is finished), the qr_task_on_send() will have no effect
on tasks in progress as the passed handle is NULL, and the task->finished
is false, thus looping infinitely.
The solution here is to let the rest of the tasks complete, even though
sending answer back will fail (which is fine).
Petr Špaček [Fri, 13 Apr 2018 17:12:59 +0000 (19:12 +0200)]
Merge branch 'tls_polish' into 'master'
tls_client logging and doc improvements
See merge request knot/knot-resolver!536
Petr Špaček [Thu, 29 Mar 2018 11:33:18 +0000 (13:33 +0200)]
tls_client: log specific errors during CA+hostname authentication
Petr Špaček [Thu, 29 Mar 2018 11:36:18 +0000 (13:36 +0200)]
tls_client: unify spelling tls-client -> tls_client
Petr Špaček [Thu, 29 Mar 2018 11:32:57 +0000 (13:32 +0200)]
tls_client: verbose log number of imported certificates
Petr Špaček [Thu, 29 Mar 2018 11:32:09 +0000 (13:32 +0200)]
tls_client: fix CA authentication examples in documentation
Vladimír Čunát [Fri, 13 Apr 2018 15:34:35 +0000 (17:34 +0200)]
Merge !558: worker_ctx: migrate leaders from map_t to trie_t
Vladimír Čunát [Fri, 13 Apr 2018 14:15:26 +0000 (16:15 +0200)]
worker_ctx: migrate leaders from map_t to trie_t
Vladimír Čunát [Fri, 13 Apr 2018 13:16:22 +0000 (15:16 +0200)]
lib/generic/array: add array_push_mm shorthand
It just feels more consistent with the rest.
Vladimír Čunát [Fri, 13 Apr 2018 14:35:38 +0000 (16:35 +0200)]
Merge !556: daemon/worker: fix missed statistics for TLS writes
Grigorii Demidov [Fri, 13 Apr 2018 13:49:13 +0000 (15:49 +0200)]
daemon/worker: fix missed collection of statistics when data is sended over TLS
Petr Špaček [Fri, 13 Apr 2018 07:32:03 +0000 (09:32 +0200)]
Merge branch 'tls-crash' into 'master'
improve TLS error handling
Closes #340
See merge request knot/knot-resolver!555
Grigorii Demidov [Wed, 11 Apr 2018 08:52:29 +0000 (10:52 +0200)]
daemon: improved error handling
Grigorii Demidov [Tue, 10 Apr 2018 15:02:56 +0000 (17:02 +0200)]
daemon: improved error handling
Vladimír Čunát [Thu, 12 Apr 2018 15:59:51 +0000 (17:59 +0200)]
Merge !550: add trie from knot-dns...
... and migrate kr_zonecut to it.
Vladimír Čunát [Tue, 10 Apr 2018 17:41:15 +0000 (19:41 +0200)]
lib/generic/set: it's unused, so stop including it
Vladimír Čunát [Tue, 10 Apr 2018 17:19:55 +0000 (19:19 +0200)]
struct kr_zonecut::nsset: migrate from map_t to trie_t
Vladimír Čunát [Tue, 10 Apr 2018 17:17:42 +0000 (19:17 +0200)]
lib/generic/trie: KR_EXPORT some functions
Needed for followup commits. The trie_* names aren't ideal for global
namespace, but ATM I can't see a better way.
Vladimír Čunát [Tue, 10 Apr 2018 17:17:10 +0000 (19:17 +0200)]
lib/generic/{array,pack}: improve documentation
Vladimír Čunát [Tue, 10 Apr 2018 17:15:58 +0000 (19:15 +0200)]
lib/generic/trie: documentation nitpicks
Vladimír Čunát [Tue, 10 Apr 2018 12:35:49 +0000 (14:35 +0200)]
pack_clone: new function
Vladimír Čunát [Tue, 10 Apr 2018 09:50:03 +0000 (11:50 +0200)]
lib/generic/trie: avoid uint redefinition
Well, we could e.g require C11 instead of C99, but this one is easy.
Vladimír Čunát [Tue, 10 Apr 2018 09:33:23 +0000 (11:33 +0200)]
lib/generic/trie: add tries from knot-dns
(Don't use them anywhere yet.)
Petr Špaček [Thu, 12 Apr 2018 15:42:59 +0000 (17:42 +0200)]
Merge branch 'marek/fix-servfails-for-root-ds' into 'master'
fixed validation of root DS
See merge request knot/knot-resolver!544
Vladimír Čunát [Mon, 9 Apr 2018 13:01:48 +0000 (15:01 +0200)]
validate: avoid DNSSEC_NODS for . DS queries
... after the parent commit. Perhaps it can't cause trouble,
but I'll feel safer this way.
Marek Vavruša [Thu, 5 Apr 2018 03:41:15 +0000 (20:41 -0700)]
fixed validation of root DS
The root DS exists outside of DNS hierarchy, so its NSEC proving non-existence
always contains the SOA, as that's the root of DNS and there's nothing above it.
Petr Špaček [Thu, 12 Apr 2018 10:13:30 +0000 (12:13 +0200)]
Merge branch 'vicky/disable_dupcheck_for_listenfd' into 'master'
Always create a endpoint in network_listen_fd
See merge request knot/knot-resolver!523
Vicky Shrestha [Wed, 17 Jan 2018 05:10:15 +0000 (21:10 -0800)]
Always create a endpoint in network_listen_fd
There is no need to check for unique addr+port for FDs passed
by a supervisor process like systemd.
Vladimír Čunát [Thu, 12 Apr 2018 09:05:43 +0000 (11:05 +0200)]
Merge !554: ci: GIT_STRATEGY: clone
Vladimír Čunát [Thu, 12 Apr 2018 08:47:27 +0000 (10:47 +0200)]
ci: GIT_STRATEGY: clone
Tomas Krizek [Wed, 11 Apr 2018 08:16:15 +0000 (10:16 +0200)]
Merge branch 'packaging-improvements' into 'master'
Packaging improvements
Closes #323
See merge request knot/knot-resolver!540
Tomas Krizek [Thu, 5 Apr 2018 16:10:18 +0000 (18:10 +0200)]
distro/deb: sync keyfile-ro patch from debian
Tomas Krizek [Tue, 27 Mar 2018 14:07:16 +0000 (16:07 +0200)]
distro/deb: avoid shipping duplicate root.hints and icann-ca.pem
Closes #323