]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
4 years agoWIP40 epsilon_experiment
Štěpán Balážik [Thu, 17 Dec 2020 15:29:46 +0000 (16:29 +0100)] 
WIP40

4 years agoWIP
Štěpán Balážik [Thu, 17 Dec 2020 15:23:18 +0000 (16:23 +0100)] 
WIP

4 years agowip: hopefully final deckard update 😏
Štěpán Balážik [Thu, 17 Dec 2020 14:34:23 +0000 (15:34 +0100)] 
wip: hopefully final deckard update 😏

4 years agoselection: reintroduce KR_NS_TIMEOUT_RETRY_INTERVAL to avoid hammering dead servers
Štěpán Balážik [Thu, 17 Dec 2020 11:53:01 +0000 (12:53 +0100)] 
selection: reintroduce KR_NS_TIMEOUT_RETRY_INTERVAL to avoid hammering dead servers

4 years agoRevert "WIP: extra logging in rplan"
Štěpán Balážik [Wed, 16 Dec 2020 16:27:50 +0000 (17:27 +0100)] 
Revert "WIP: extra logging in rplan"

This reverts commit b87d61fc077d0b449e4a880316802d8ce5ea8054.

4 years agowip: update Deckard
Štěpán Balážik [Wed, 16 Dec 2020 15:07:01 +0000 (16:07 +0100)] 
wip: update Deckard

4 years agoselection: define ε using constants
Štěpán Balážik [Wed, 16 Dec 2020 10:43:22 +0000 (11:43 +0100)] 
selection: define ε using constants

4 years agoselection: log appropriately
Štěpán Balážik [Tue, 15 Dec 2020 15:20:18 +0000 (16:20 +0100)] 
selection: log appropriately

4 years agofixup! fixup! fixup! fixup! selection: refactor updating address state
Štěpán Balážik [Tue, 15 Dec 2020 12:34:35 +0000 (13:34 +0100)] 
fixup! fixup! fixup! fixup! selection: refactor updating address state

4 years agofixup! WIP: document the new requirements on forwarding targets
Štěpán Balážik [Tue, 15 Dec 2020 12:20:22 +0000 (13:20 +0100)] 
fixup! WIP: document the new requirements on forwarding targets

4 years agoWIP: document the new requirements on forwarding targets
Štěpán Balážik [Tue, 15 Dec 2020 11:58:05 +0000 (12:58 +0100)] 
WIP: document the new requirements on forwarding targets

4 years agofixup! fixup! fixup! selection: make forwarding API more foolproof
Štěpán Balážik [Tue, 15 Dec 2020 11:54:46 +0000 (12:54 +0100)] 
fixup! fixup! fixup! selection: make forwarding API more foolproof

4 years agofixup! fixup! selection: make forwarding API more foolproof
Štěpán Balážik [Tue, 15 Dec 2020 11:31:32 +0000 (12:31 +0100)] 
fixup! fixup! selection: make forwarding API more foolproof

4 years agofixup! selection: make forwarding API more foolproof
Vladimír Čunát [Mon, 14 Dec 2020 17:31:50 +0000 (18:31 +0100)] 
fixup! selection: make forwarding API more foolproof

4 years agofixup! fixup! fixup! selection: refactor updating address state
Vladimír Čunát [Mon, 14 Dec 2020 17:30:00 +0000 (18:30 +0100)] 
fixup! fixup! fixup! selection: refactor updating address state

Order is significant, like in proper C.

4 years agofixup! fixup! fixup! selection: refactor updating address state
Štěpán Balážik [Mon, 7 Dec 2020 16:30:22 +0000 (17:30 +0100)] 
fixup! fixup! fixup! selection: refactor updating address state

4 years agofixup! fixup! selection: refactor updating address state
Štěpán Balážik [Mon, 7 Dec 2020 16:17:00 +0000 (17:17 +0100)] 
fixup! fixup! selection: refactor updating address state

4 years agoselection: make forwarding API more foolproof
Štěpán Balážik [Mon, 7 Dec 2020 16:13:13 +0000 (17:13 +0100)] 
selection: make forwarding API more foolproof

4 years agofixup! selection: refactor updating address state
Štěpán Balážik [Mon, 7 Dec 2020 16:12:59 +0000 (17:12 +0100)] 
fixup! selection: refactor updating address state

4 years agoselection: refactor updating address state
Štěpán Balážik [Mon, 7 Dec 2020 12:21:47 +0000 (13:21 +0100)] 
selection: refactor updating address state

avoid unnecesary trie iteration

4 years agofixup! selection: refactor the use of `update_name_state`
Štěpán Balážik [Fri, 4 Dec 2020 15:54:52 +0000 (16:54 +0100)] 
fixup! selection: refactor the use of `update_name_state`

4 years agofixup! selection_forward: nit: rename variable
Štěpán Balážik [Fri, 4 Dec 2020 15:35:15 +0000 (16:35 +0100)] 
fixup! selection_forward: nit: rename variable

4 years agofixup! fixup! WIP: remove attempts of asynchronous resolution for good
Štěpán Balážik [Fri, 4 Dec 2020 15:33:15 +0000 (16:33 +0100)] 
fixup! fixup! WIP: remove attempts of asynchronous resolution for good

4 years agoselection_forward: nit: rename variable
Štěpán Balážik [Fri, 4 Dec 2020 13:13:18 +0000 (14:13 +0100)] 
selection_forward: nit: rename variable

4 years agofixup! WIP: remove attempts of asynchronous resolution for good
Štěpán Balážik [Fri, 4 Dec 2020 13:13:12 +0000 (14:13 +0100)] 
fixup! WIP: remove attempts of asynchronous resolution for good

4 years agoselection: comment the exploit option in `select_transport`
Štěpán Balážik [Fri, 4 Dec 2020 13:00:57 +0000 (14:00 +0100)] 
selection: comment the exploit option in `select_transport`

4 years agofixup! selection: avoided repeated indexing to choices array in select_transport
Štěpán Balážik [Fri, 4 Dec 2020 12:54:18 +0000 (13:54 +0100)] 
fixup! selection: avoided repeated indexing to choices array in select_transport

4 years agoselection: avoided repeated indexing to choices array in select_transport
Štěpán Balážik [Fri, 4 Dec 2020 12:51:05 +0000 (13:51 +0100)] 
selection: avoided repeated indexing to choices array in select_transport

4 years agoselection: comment on static timeout when forwarding
Štěpán Balážik [Fri, 4 Dec 2020 12:43:42 +0000 (13:43 +0100)] 
selection: comment on static timeout when forwarding

4 years agoselection: refactor the use of `update_name_state`
Štěpán Balážik [Fri, 4 Dec 2020 12:34:59 +0000 (13:34 +0100)] 
selection: refactor the use of `update_name_state`

4 years agoselection: document `. DNSKEY` resolution
Štěpán Balážik [Fri, 4 Dec 2020 11:23:49 +0000 (12:23 +0100)] 
selection: document `. DNSKEY` resolution

4 years agoselection: document cache transaction usage
Štěpán Balážik [Fri, 4 Dec 2020 11:20:32 +0000 (12:20 +0100)] 
selection: document cache transaction usage

4 years agoselection: rename internal `choose_transport` function
Štěpán Balážik [Fri, 4 Dec 2020 11:00:54 +0000 (12:00 +0100)] 
selection: rename internal `choose_transport` function

The name was the same as the one used in the server_selection structure.

4 years agofixup! selection: remove `success` function from API
Štěpán Balážik [Thu, 3 Dec 2020 14:04:31 +0000 (15:04 +0100)] 
fixup! selection: remove `success` function from API

4 years agofixup! fixup! selection: factor out local_state properly
Štěpán Balážik [Thu, 3 Dec 2020 13:58:05 +0000 (14:58 +0100)] 
fixup! fixup! selection: factor out local_state properly

4 years agofixup! selection: fix TCP logging
Štěpán Balážik [Thu, 3 Dec 2020 13:51:10 +0000 (14:51 +0100)] 
fixup! selection: fix TCP logging

4 years agoselection: fix TCP logging
Štěpán Balážik [Thu, 3 Dec 2020 13:48:36 +0000 (14:48 +0100)] 
selection: fix TCP logging

We need to propagate the choices of TCP to `qry->flags.TCP` since it is
used in other parts of the resolver.

4 years agoselection: remove `success` function from API
Štěpán Balážik [Mon, 30 Nov 2020 18:26:17 +0000 (19:26 +0100)] 
selection: remove `success` function from API

It was no-op anyways.

4 years agoWIP: deckard update for mx_nic
Štěpán Balážik [Mon, 30 Nov 2020 16:56:34 +0000 (17:56 +0100)] 
WIP: deckard update for mx_nic

4 years agoselection: clarify backing off of the timeout
Štěpán Balážik [Mon, 30 Nov 2020 16:44:18 +0000 (17:44 +0100)] 
selection: clarify backing off of the timeout

4 years agoselection: comment on common feedback function
Štěpán Balážik [Mon, 30 Nov 2020 16:32:35 +0000 (17:32 +0100)] 
selection: comment on common feedback function

4 years agofixup! selection: factor out local_state properly
Štěpán Balážik [Mon, 30 Nov 2020 16:32:07 +0000 (17:32 +0100)] 
fixup! selection: factor out local_state properly

4 years agoselection: factor out local_state properly
Štěpán Balážik [Mon, 30 Nov 2020 16:14:50 +0000 (17:14 +0100)] 
selection: factor out local_state properly

4 years agoselection: treat TC bit over TCP as unrecoverable error for transport
Štěpán Balážik [Mon, 30 Nov 2020 14:06:58 +0000 (15:06 +0100)] 
selection: treat TC bit over TCP as unrecoverable error for transport

4 years agoselection: rename KR_SELECTION_TIMEOUT to KR_SELECTION_QUERY_TIMEOUT
Štěpán Balážik [Mon, 30 Nov 2020 13:57:15 +0000 (14:57 +0100)] 
selection: rename KR_SELECTION_TIMEOUT to KR_SELECTION_QUERY_TIMEOUT

4 years agoselection: comment on possible race in update_rtt
Štěpán Balážik [Mon, 30 Nov 2020 13:46:11 +0000 (14:46 +0100)] 
selection: comment on possible race in update_rtt

4 years agoselection: clarify choice_index in choose_transport
Štěpán Balážik [Mon, 30 Nov 2020 13:41:09 +0000 (14:41 +0100)] 
selection: clarify choice_index in choose_transport

4 years agofixup! WIP: remove attempts of asynchronous resolution for good
Štěpán Balážik [Mon, 30 Nov 2020 13:18:15 +0000 (14:18 +0100)] 
fixup! WIP: remove attempts of asynchronous resolution for good

4 years agoWIP: remove attempts of asynchronous resolution for good
Štěpán Balážik [Mon, 30 Nov 2020 13:09:47 +0000 (14:09 +0100)] 
WIP: remove attempts of asynchronous resolution for good

4 years agoselection: clarify `type` field in struct `to_resolve`
Štěpán Balážik [Mon, 30 Nov 2020 13:00:07 +0000 (14:00 +0100)] 
selection: clarify `type` field in struct `to_resolve`

4 years agofixup! readability: rename `transport::name` to `ns_name`
Štěpán Balážik [Mon, 30 Nov 2020 12:54:46 +0000 (13:54 +0100)] 
fixup! readability: rename `transport::name` to `ns_name`

4 years agoselection: comment out unused TCP connection information for now
Štěpán Balážik [Mon, 30 Nov 2020 12:17:02 +0000 (13:17 +0100)] 
selection: comment out unused TCP connection information for now

4 years agodocs: comment on the meaning of `generation` field in structures
Štěpán Balážik [Mon, 30 Nov 2020 11:54:50 +0000 (12:54 +0100)] 
docs: comment on the meaning of `generation` field in structures

4 years agodocs: clarify where transport structure is allocated
Štěpán Balážik [Mon, 30 Nov 2020 11:42:16 +0000 (12:42 +0100)] 
docs: clarify where transport structure is allocated

4 years agoreadability: rename `transport::name` to `ns_name`
Štěpán Balážik [Mon, 30 Nov 2020 11:37:32 +0000 (12:37 +0100)] 
readability: rename `transport::name` to `ns_name`

4 years agoWIP: suggestions for lib/selection.h
Štěpán Balážik [Fri, 27 Nov 2020 16:18:38 +0000 (17:18 +0100)] 
WIP: suggestions for lib/selection.h

4 years agoWIP: suggestions for lib/selection.h
Štěpán Balážik [Fri, 27 Nov 2020 16:18:22 +0000 (17:18 +0100)] 
WIP: suggestions for lib/selection.h

4 years agofixup! selection: limit backing of the timeout
Štěpán Balážik [Fri, 27 Nov 2020 15:37:51 +0000 (16:37 +0100)] 
fixup! selection: limit backing of the timeout

4 years agofixup! selection: limit backing of the timeout
Štěpán Balážik [Fri, 27 Nov 2020 15:30:17 +0000 (16:30 +0100)] 
fixup! selection: limit backing of the timeout

4 years agofixup! WIP: docs and cleanup
Štěpán Balážik [Fri, 27 Nov 2020 15:13:07 +0000 (16:13 +0100)] 
fixup! WIP: docs and cleanup

4 years agofixup! selection_iter: treat resolving A and AAAA records for NS names equally
Štěpán Balážik [Fri, 27 Nov 2020 14:59:58 +0000 (15:59 +0100)] 
fixup! selection_iter: treat resolving A and AAAA records for NS names equally

4 years agofixup! first buildable version of server selection rewrite
Štěpán Balážik [Fri, 27 Nov 2020 14:51:55 +0000 (15:51 +0100)] 
fixup! first buildable version of server selection rewrite

4 years agofixup! first buildable version of server selection rewrite
Štěpán Balážik [Fri, 27 Nov 2020 14:50:18 +0000 (15:50 +0100)] 
fixup! first buildable version of server selection rewrite

4 years agofixup! first buildable version of server selection rewrite
Štěpán Balážik [Fri, 27 Nov 2020 14:44:29 +0000 (15:44 +0100)] 
fixup! first buildable version of server selection rewrite

4 years agofixup! first buildable version of server selection rewrite
Štěpán Balážik [Fri, 27 Nov 2020 14:30:37 +0000 (15:30 +0100)] 
fixup! first buildable version of server selection rewrite

4 years agoWIP: deckard lidovky fix
Štěpán Balážik [Fri, 27 Nov 2020 10:33:43 +0000 (11:33 +0100)] 
WIP: deckard lidovky fix

4 years agofixup! mitigate NXNSAttack protocol vulnerability for wildcards in victim zone
Vladimír Čunát [Fri, 27 Nov 2020 09:18:46 +0000 (10:18 +0100)] 
fixup! mitigate NXNSAttack protocol vulnerability for wildcards in victim zone

4 years agoselection: workarround for iter_ns_badip.rpl
Štěpán Balážik [Thu, 26 Nov 2020 16:39:43 +0000 (17:39 +0100)] 
selection: workarround for iter_ns_badip.rpl

4 years agofixup! fixup! fixup! WIP: docs and cleanup
Štěpán Balážik [Thu, 26 Nov 2020 16:39:32 +0000 (17:39 +0100)] 
fixup! fixup! fixup! WIP: docs and cleanup

4 years agofixup! fixup! WIP: docs and cleanup
Štěpán Balážik [Thu, 26 Nov 2020 15:21:53 +0000 (16:21 +0100)] 
fixup! fixup! WIP: docs and cleanup

4 years agoiterate: log when rejecting a glue record because of network settings
Štěpán Balážik [Thu, 26 Nov 2020 15:20:39 +0000 (16:20 +0100)] 
iterate: log when rejecting a glue record because of network settings

4 years agofixup! lib/cache: fix tests to the new versions of selection and Deckard
Štěpán Balážik [Thu, 26 Nov 2020 15:20:24 +0000 (16:20 +0100)] 
fixup! lib/cache: fix tests to the new versions of selection and Deckard

4 years agoWIP: deckard rebase
Štěpán Balážik [Thu, 26 Nov 2020 11:17:38 +0000 (12:17 +0100)] 
WIP: deckard rebase

4 years agofixup! WIP: docs and cleanup
Štěpán Balážik [Thu, 26 Nov 2020 10:57:06 +0000 (11:57 +0100)] 
fixup! WIP: docs and cleanup

4 years agoWIP: kres-gen fix
Štěpán Balážik [Thu, 26 Nov 2020 10:39:08 +0000 (11:39 +0100)] 
WIP: kres-gen fix

4 years agoTODO: description
Vladimír Čunát [Mon, 16 Nov 2020 13:28:49 +0000 (14:28 +0100)] 
TODO: description

4 years agoRevert "iterate.c: be parent-centric in NS name resolution"
Štěpán Balážik [Mon, 23 Nov 2020 12:31:18 +0000 (13:31 +0100)] 
Revert "iterate.c: be parent-centric in NS name resolution"

This reverts commit 181423ae0eb906ebfbeb5b4aee29fa7044f582eb.

4 years agoWIP: docs and cleanup
Štěpán Balážik [Mon, 23 Nov 2020 12:30:59 +0000 (13:30 +0100)] 
WIP: docs and cleanup

4 years agolib/cache: fix tests to the new versions of selection and Deckard
Štěpán Balážik [Thu, 12 Nov 2020 17:25:47 +0000 (18:25 +0100)] 
lib/cache: fix tests to the new versions of selection and Deckard

4 years agomodules/ta_update: set rootns. as root NS name in tests
Štěpán Balážik [Thu, 12 Nov 2020 15:56:10 +0000 (16:56 +0100)] 
modules/ta_update: set rootns. as root NS name in tests

4 years agobogus_log: up the number of expected queries for . DNSKEY
Štěpán Balážik [Thu, 12 Nov 2020 15:49:20 +0000 (16:49 +0100)] 
bogus_log: up the number of expected queries for . DNSKEY

Since DNSSEC fails are no longer hard-fails, the resolution
continues after such fail. In this case there no further options
so we get bounded by KR_CONSUME_FAIL_ROW_LIMIT at each of the 2
queries.

4 years agoWIP
Štěpán Balážik [Mon, 9 Nov 2020 14:55:59 +0000 (15:55 +0100)] 
WIP

4 years agonsrep: partial fix for duplicated queries
Petr Špaček [Fri, 6 Nov 2020 20:58:56 +0000 (21:58 +0100)] 
nsrep: partial fix for duplicated queries

Current pending query was ignored when checking pending list in rplan.

This does not remove all duplicies because we would have to check also
rplan->resolved list.

4 years agoWIP: extra logging in rplan
Petr Špaček [Fri, 6 Nov 2020 18:06:02 +0000 (19:06 +0100)] 
WIP: extra logging in rplan

4 years agoselection: further NSNXAttack mitigation and fix tests
Štěpán Balážik [Fri, 6 Nov 2020 11:23:11 +0000 (12:23 +0100)] 
selection: further NSNXAttack mitigation and fix tests

4 years agomitigate NXNSAttack protocol vulnerability for wildcards in victim zone
Vladimír Čunát [Tue, 5 May 2020 09:32:02 +0000 (11:32 +0200)] 
mitigate NXNSAttack protocol vulnerability for wildcards in victim zone

Attacker might generate fake NS records pointing to victim's DNS zone.
If the zone contains wildcard the attacker might force us into packet
exchange with a (lame) DNS server on that IP address.

We now limit number of consecuctive failures and kill whole request if
limit is exceeded.

4 years agotests: replace cache_overflow test, fix its config file
Štěpán Balážik [Mon, 26 Oct 2020 16:52:29 +0000 (17:52 +0100)] 
tests: replace cache_overflow test, fix its config file

4 years agotests: turn off IPv6 where neccesary
Štěpán Balážik [Mon, 26 Oct 2020 10:41:43 +0000 (11:41 +0100)] 
tests: turn off IPv6 where neccesary

4 years agoselection: turn on SAFEMODE on FORMERROR
Štěpán Balážik [Mon, 19 Oct 2020 15:14:22 +0000 (17:14 +0200)] 
selection: turn on SAFEMODE on FORMERROR

4 years agoselection: retry after DNSSEC fail
Štěpán Balážik [Mon, 19 Oct 2020 14:23:40 +0000 (16:23 +0200)] 
selection: retry after DNSSEC fail

Some other server might not have bogus signatures.

4 years agoselection: properly check for cyclic NS dependencies
Štěpán Balážik [Fri, 16 Oct 2020 14:24:15 +0000 (16:24 +0200)] 
selection: properly check for cyclic NS dependencies

This is kind of done in ns_resolve_addr as well, but we need this
information *before* making the choice.

4 years agoresolve.c: reintroduce reset of flags.AWAIT_IPV{4,6} after resolution
Štěpán Balážik [Fri, 16 Oct 2020 12:39:47 +0000 (14:39 +0200)] 
resolve.c: reintroduce reset of flags.AWAIT_IPV{4,6} after resolution

I deleted it by accident as it was hidden in some older nsrep function.

4 years agoselection: avoid chicken and egg problem when resolving . DS
Štěpán Balážik [Fri, 16 Oct 2020 10:39:12 +0000 (12:39 +0200)] 
selection: avoid chicken and egg problem when resolving . DS

4 years agoiterate.c: be parent-centric in NS name resolution
Štěpán Balážik [Thu, 15 Oct 2020 16:47:55 +0000 (18:47 +0200)] 
iterate.c: be parent-centric in NS name resolution

When qry->flags.NONAUTH is true (we are resolving a NS name) end the
resolution once a answer is found even in glue.

Previous state lead to a weird behaviour where some IPv4 only tests in
Deckard (namely `iter_pcdiff.rpl`) were failing with IPv6 turned off.

This was due to the resolvers' internal preference towards AAAA records
for NS names. With IPv6 networking on, NS name resolution was first done
for AAAA record and the glue (containing A record for the NS name in
question) from parent zone was in to cache.

As the AAAA resolution failed (there is no AAAA for this NS name), A was
quried next and was satisfied from cache.

With IPv6 off, there is no query for the AAAA record, so no A record
from glue gets put in to the cache. A record is resolved first,
resolution ignores the glue in parent zone and continue to the child
zone which might be (and in the case of `iter_pcdiff.rpl` intentionally
is) broken.

4 years agoWIP: always explore
Štěpán Balážik [Thu, 15 Oct 2020 12:11:42 +0000 (14:11 +0200)] 
WIP: always explore

Make Deckard go BOOM 🤯

4 years agoselection: readd CNAME error handling
Štěpán Balážik [Mon, 12 Oct 2020 08:45:38 +0000 (10:45 +0200)] 
selection: readd CNAME error handling

4 years agoselection_iter: treat resolving A and AAAA records for NS names equally
Štěpán Balážik [Fri, 9 Oct 2020 15:59:35 +0000 (17:59 +0200)] 
selection_iter: treat resolving A and AAAA records for NS names equally

Before, there was some bias towards resolving AAAA records first and
resolving A records only when IPv6 is broken or not available.

4 years agoselection: support serve_stale module
Štěpán Balážik [Fri, 9 Oct 2020 14:54:01 +0000 (16:54 +0200)] 
selection: support serve_stale module

4 years agoselection: set default timeout to 800 ms
Štěpán Balážik [Fri, 9 Oct 2020 09:15:03 +0000 (11:15 +0200)] 
selection: set default timeout to 800 ms

This is pretty much equivalent to the state before rewrite.

4 years agoselection: try to resolve NS addr instead of choosing the same server
Štěpán Balážik [Thu, 10 Sep 2020 11:39:24 +0000 (13:39 +0200)] 
selection: try to resolve NS addr instead of choosing the same server