]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
4 years agoMerge branch 'ci-update-knot3.0' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1092 obs-knot-dns-deve-jq0xxt/deployments/1094 obs-knot-dns-deve-jq0xxt/deployments/1096 obs-knot-dns-deve-jq0xxt/deployments/1099 obs-knot-dns-deve-jq0xxt/deployments/1101 obs-knot-dns-deve-jq0xxt/deployments/1103 obs-knot-dns-deve-jq0xxt/deployments/1104 obs-knot-resolver-es11k1/deployments/1093 obs-knot-resolver-es11k1/deployments/1095 obs-knot-resolver-es11k1/deployments/1097 obs-knot-resolver-es11k1/deployments/1098 obs-knot-resolver-es11k1/deployments/1100 obs-knot-resolver-es11k1/deployments/1102 obs-knot-resolver-es11k1/deployments/1105
Tomas Krizek [Wed, 16 Sep 2020 11:53:56 +0000 (13:53 +0200)] 
Merge branch 'ci-update-knot3.0' into 'master'

CI: update knot3.0

See merge request knot/knot-resolver!1062

4 years agoci: pylint: fix raise-missing-from warning (W0707)
Lukáš Ježek [Wed, 16 Sep 2020 11:09:43 +0000 (13:09 +0200)] 
ci: pylint: fix raise-missing-from warning (W0707)

4 years agoci: use docker image with knot 3.0
Lukáš Ježek [Mon, 14 Sep 2020 13:57:20 +0000 (15:57 +0200)] 
ci: use docker image with knot 3.0

4 years agoMerge !1060: utils/cache_gc: fix a rebase error causing GC crashes obs-knot-dns-deve-jq0xxt/deployments/1088 obs-knot-dns-deve-jq0xxt/deployments/1089 obs-knot-resolver-es11k1/deployments/1087 obs-knot-resolver-es11k1/deployments/1090
Vladimír Čunát [Mon, 14 Sep 2020 08:54:36 +0000 (10:54 +0200)] 
Merge !1060: utils/cache_gc: fix a rebase error causing GC crashes

4 years agoutils/cache_gc: fix a rebase error causing GC crashes obs-knot-resolver-bs4hbr/deployments/1080
Vladimír Čunát [Fri, 11 Sep 2020 08:17:47 +0000 (10:17 +0200)] 
utils/cache_gc: fix a rebase error causing GC crashes

It's one of the places still using Knot's void* and I managed to pass
the wrong `db` :-/

4 years agoMerge branch 'timeout_timer_fix' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1077 obs-knot-dns-deve-jq0xxt/deployments/1082 obs-knot-dns-deve-jq0xxt/deployments/1083 obs-knot-dns-deve-jq0xxt/deployments/1086 obs-knot-resolver-es11k1/deployments/1078 obs-knot-resolver-es11k1/deployments/1081 obs-knot-resolver-es11k1/deployments/1084 obs-knot-resolver-es11k1/deployments/1085
Tomas Krizek [Thu, 10 Sep 2020 15:52:45 +0000 (17:52 +0200)] 
Merge branch 'timeout_timer_fix' into 'master'

improve precision of UDP timeout measurement

See merge request knot/knot-resolver!1047

4 years agodaemon/worker: code style nitpicks
Tomas Krizek [Thu, 10 Sep 2020 14:55:48 +0000 (16:55 +0200)] 
daemon/worker: code style nitpicks

4 years agodaemon/worker: start retransmit timer after UDP packet is sent
Štěpán Balážik [Wed, 19 Aug 2020 08:52:17 +0000 (10:52 +0200)] 
daemon/worker: start retransmit timer after UDP packet is sent

Previously this was done *before* calling uv_udp_send which lead to many
early retransmits (significant amount of time might pass between calling
uv_udp_send and the moment the packet is actually send to the wire).

4 years agoMerge branch 'cache-api-typesafe' into 'master' obs-knot-resolver-bs4hbr/deployments/1079
Petr Špaček [Thu, 10 Sep 2020 09:30:10 +0000 (11:30 +0200)] 
Merge branch 'cache-api-typesafe' into 'master'

lib/cache: type safety of the cache API pointers

See merge request knot/knot-resolver!1049

4 years agolib/cache kr_cdb_api::space_usage(): also use kr_cdb_pt
Vladimír Čunát [Sat, 22 Aug 2020 09:47:51 +0000 (11:47 +0200)] 
lib/cache kr_cdb_api::space_usage(): also use kr_cdb_pt

- The malloc-free pair could be avoided without difficulty,
  but it seemed like premature optimization.
- The libknot functions make error handling a bit difficult
  (zero is theoretically valid and doesn't show error type),
  but writing this properly without libknot would need 10-20
  additional lines of code and the risk of encountering errors
  in this function seems very low anyway.

4 years agolib/cache: type safety of the cache API pointers
Vladimír Čunát [Sat, 22 Aug 2020 08:24:35 +0000 (10:24 +0200)] 
lib/cache: type safety of the cache API pointers

See the definition of kr_cdb_pt for details.

4 years agoMerge !1026: net: split the EDNS buffer size into upstream and downstream obs-knot-dns-deve-jq0xxt/deployments/1076 obs-knot-resolver-es11k1/deployments/1075
Vladimír Čunát [Wed, 9 Sep 2020 16:38:37 +0000 (18:38 +0200)] 
Merge !1026: net: split the EDNS buffer size into upstream and downstream

4 years agonet: split the EDNS buffer size into upstream and downstream
Vladimír Čunát [Wed, 9 Sep 2020 14:34:27 +0000 (16:34 +0200)] 
net: split the EDNS buffer size into upstream and downstream

(Tiny nitpicks addressed by vcunat.)

4 years agoMerge !1055: workarounds: remove *.in-addr.arpa.net NO_0X20 workarrounds
Vladimír Čunát [Wed, 9 Sep 2020 14:17:15 +0000 (16:17 +0200)] 
Merge !1055: workarounds: remove *.in-addr.arpa.net NO_0X20 workarrounds

4 years agoworkarounds: remove *.in-addr.arpa.net NO_0X20 workarrounds
Štěpán Balážik [Fri, 4 Sep 2020 10:04:18 +0000 (12:04 +0200)] 
workarounds: remove *.in-addr.arpa.net NO_0X20 workarrounds

The Internet has changed, turktel ones are fixed, edatel one does not
work at all.

4 years agoMerge branch 'release-5-1-3' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1073 obs-knot-resolver-8xyvhu/deployments/1072 obs-knot-resolver-es11k1/deployments/1074 obs-knot-resolver-kv62s6/deployments/1071 v5.1.3
Tomas Krizek [Tue, 8 Sep 2020 11:08:36 +0000 (13:08 +0200)] 
Merge branch 'release-5-1-3' into 'master'

release 5.1.3

See merge request knot/knot-resolver!1059

4 years agorelease 5.1.3
Tomas Krizek [Tue, 8 Sep 2020 10:38:40 +0000 (12:38 +0200)] 
release 5.1.3

4 years agoMerge branch 'cache-forking' into 'master'
Tomas Krizek [Tue, 8 Sep 2020 10:26:35 +0000 (12:26 +0200)] 
Merge branch 'cache-forking' into 'master'

cache-forking fixes

See merge request knot/knot-resolver!1042

4 years agogc: NEWS, last fix for v5.1.3
Petr Špaček [Tue, 8 Sep 2020 10:25:00 +0000 (12:25 +0200)] 
gc: NEWS, last fix for v5.1.3

4 years agocache: fix race in assert_right_version obs-knot-resolver-bs4hbr/deployments/1068
Petr Špaček [Mon, 7 Sep 2020 14:08:05 +0000 (16:08 +0200)] 
cache: fix race in assert_right_version

This change fixes race condition in assert_right_version(). Racy
situation:
- Two instances have the (empty) cache open: New binary and old binary.
- New binary executes count() inside assert_right_version(), which
  internally starts RO transaction. Returned count is 0.
- Old binary does some writes (RW transaction parallel to RO in the first
  process).
- New binary skips cache clear because cache was empty at the time of check.
- Result: The old binary wrote data with an old format into cache which
  was not cleared and silenty changed version number to a new one.

This is not complete fix because we lack mechanism to detect cache format
change at run-time, but at least it removes one nasty corner case and
cost of this change seems to be minimal.

4 years agolib/cache: switch .cachelock to fcntl()
Vladimír Čunát [Fri, 4 Sep 2020 18:54:52 +0000 (20:54 +0200)] 
lib/cache: switch .cachelock to fcntl()

This gives us correctness, especially on "staleness" detection.
For simplicity we now don't remove "stale" .cachelock on opening cache,
but it doesn't obstruct us in any way (and overflow will remove it).

4 years agolib/cache: tweaks round transactions
Vladimír Čunát [Fri, 4 Sep 2020 17:31:51 +0000 (19:31 +0200)] 
lib/cache: tweaks round transactions

- The switched order is documented not to make difference,
  but it seems much clearer this way.
- MDB_TXN_FULL wasn't handled correctly (a reversed condition)
  and current LMDB code indicates that such transaction is
  not recoverable anyway... so we give up on trying.

4 years agolib/cache: avoid printing relative paths to cache
Vladimír Čunát [Fri, 4 Sep 2020 17:24:21 +0000 (19:24 +0200)] 
lib/cache: avoid printing relative paths to cache

4 years agolib/cache: improve debugging prints
Petr Špaček [Fri, 4 Sep 2020 17:19:18 +0000 (19:19 +0200)] 
lib/cache: improve debugging prints

(This has shared authorship, basically, mostly from MR suggestions.)

4 years agocache, GC: improve handling of LMDB maxsize
Vladimír Čunát [Thu, 27 Aug 2020 13:08:48 +0000 (15:08 +0200)] 
cache, GC: improve handling of LMDB maxsize

This version seems to work OK.  Unfortunately we had to resort to
an extra write and cache reopening when attempting to set cache size.
And even so, decreasing the size can't really be done, so we only warn
about failing to do that.

4 years agogc: print cache usage in every cycle if in verbose mode
Petr Špaček [Tue, 25 Aug 2020 15:01:46 +0000 (17:01 +0200)] 
gc: print cache usage in every cycle if in verbose mode

4 years agogc: verbose mode is now runtime option
Petr Špaček [Tue, 25 Aug 2020 15:01:08 +0000 (17:01 +0200)] 
gc: verbose mode is now runtime option

4 years agoutils/cache_gc nitpick: more precise error prints
Vladimír Čunát [Mon, 24 Aug 2020 16:01:59 +0000 (18:01 +0200)] 
utils/cache_gc nitpick: more precise error prints

4 years agoutils/cache_gc nitpick: print time in milliseconds
Vladimír Čunát [Mon, 24 Aug 2020 15:55:25 +0000 (17:55 +0200)] 
utils/cache_gc nitpick: print time in milliseconds

For the usual use cases, whole milliseconds seem to make more sense
than seconds with 10ms precision.

4 years agoutils/cache_gc: comments and cleanup in kr_cache_gc()
Vladimír Čunát [Fri, 21 Aug 2020 09:40:49 +0000 (11:40 +0200)] 
utils/cache_gc: comments and cleanup in kr_cache_gc()

4 years agotests: fine tune integration test for GC
Vladimír Čunát [Mon, 24 Aug 2020 15:47:29 +0000 (17:47 +0200)] 
tests: fine tune integration test for GC

TL;DR: tune the test - now it works quite reliably for me,
though it's perhaps not nice.

With 1 MiB cache it's not easy to avoid overflows, as the defaults are
meant for much larger sizes.  Normal GC target is to decrease usage
by 10% when above 80% in 100 records per transaction.  That just won't
work reliable due to 10% being only 25 pages.

This commit makes the test run GC with more suitable tuning and
frequently pauses kresd to give GC better chance to catch up.

4 years agotests: integration test for GC
Petr Špaček [Wed, 19 Aug 2020 13:36:42 +0000 (15:36 +0200)] 
tests: integration test for GC

GC should prevent cache from overflowing.

4 years agotests: integration test for cache overflow situation
Petr Špaček [Wed, 19 Aug 2020 10:18:09 +0000 (12:18 +0200)] 
tests: integration test for cache overflow situation

Resolvers must answer queries even if the shared cache overflown during query processing.

4 years agolib/cache: run check_health() every five seconds
Vladimír Čunát [Wed, 19 Aug 2020 09:39:19 +0000 (11:39 +0200)] 
lib/cache: run check_health() every five seconds

... in case of usage from kresd (GC does it a bit differently).

4 years agolib/cache check_health(): also detect size changes
Vladimír Čunát [Wed, 19 Aug 2020 08:23:04 +0000 (10:23 +0200)] 
lib/cache check_health(): also detect size changes

This is important for GC - otherwise the usage computation would be
wrong after another process changed size (without replacing the file).

4 years agolib/cache: abort() if emergency cache-clear fails
Vladimír Čunát [Tue, 18 Aug 2020 16:45:28 +0000 (18:45 +0200)] 
lib/cache: abort() if emergency cache-clear fails

As the code has been so far, there's no usable cache in that case
and some code just can't handle that.  Up to now we were getting
SIGSEGV from inside LMDB on the next attempted operation.

We might consider loosening preallocation in that case or even
retrying after a short sleep.  Systemd's restart after hold-off
timeout has an effect similar to the short sleep.

4 years agoutils/cache_gc: tolerate ESPACE unless twice in a row
Vladimír Čunát [Tue, 18 Aug 2020 09:34:43 +0000 (11:34 +0200)] 
utils/cache_gc: tolerate ESPACE unless twice in a row

In the unlikely case that GC happens "too late", it could fail when
deleting, in which case it seems best to reopen the cache and try again,
as it will probably be deleted by a kresd instance by the next interval.

4 years agoutils/cache_gc: avoid too long RO transactions
Vladimír Čunát [Mon, 17 Aug 2020 17:15:04 +0000 (19:15 +0200)] 
utils/cache_gc: avoid too long RO transactions

Until now the analyzing pass over full DB was taking place
in a single RO transaction.  For an unknown reason this caused kresd
processes to get MDB_MAP_FULL from mdb_put(), even though clearly there
were plenty free pages at that point.

Basic experiments show that 1k steps are OK and 10k steps are not.

4 years agoutils/cache_gc: handle one more error
Vladimír Čunát [Mon, 17 Aug 2020 17:13:59 +0000 (19:13 +0200)] 
utils/cache_gc: handle one more error

though I've never seen it happening.

4 years agolib/cache: abort transactions on errors
Vladimír Čunát [Mon, 17 Aug 2020 08:38:20 +0000 (10:38 +0200)] 
lib/cache: abort transactions on errors

This apparently gets rid of MDB_BAD_TXN failures that we were getting
when cache overflows.  Unfortunately LMDB docs don't mention that
after operation failures one should abort the corresponding transaction.

4 years agolib/cache nitpick: more consistent naming
Vladimír Čunát [Mon, 17 Aug 2020 07:52:09 +0000 (09:52 +0200)] 
lib/cache nitpick: more consistent naming

4 years agoutils/cache_gc: utilize kr_cdb_api::check_health()
Vladimír Čunát [Fri, 14 Aug 2020 14:47:13 +0000 (16:47 +0200)] 
utils/cache_gc: utilize kr_cdb_api::check_health()

Now it should keep working if the file has been replaced.

4 years agoWIP: lib/cache: factor out kr_cdb_api::check_health()
Vladimír Čunát [Fri, 14 Aug 2020 12:15:18 +0000 (14:15 +0200)] 
WIP: lib/cache: factor out kr_cdb_api::check_health()

FIXME: review, testing, etc.

A couple functions got folded into cdb_open_env(), as the split was
complicating situation (mainly around error handling).

4 years agoMerge branch 'upgrading' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1069 obs-knot-resolver-es11k1/deployments/1070
Petr Špaček [Mon, 7 Sep 2020 15:13:34 +0000 (17:13 +0200)] 
Merge branch 'upgrading' into 'master'

doc: upcoming changes

See merge request knot/knot-resolver!1057

4 years agodoc: DNS Flag Day 2020 warning
Petr Špaček [Mon, 7 Sep 2020 14:30:46 +0000 (16:30 +0200)] 
doc: DNS Flag Day 2020 warning

4 years agodoc: DoH without TLS or over HTTP 1 is deprecated
Petr Špaček [Mon, 7 Sep 2020 07:14:51 +0000 (09:14 +0200)] 
doc: DoH without TLS or over HTTP 1 is deprecated

4 years agodoc: new section in upgrading guide about upcoming changes
Petr Špaček [Mon, 7 Sep 2020 07:00:53 +0000 (09:00 +0200)] 
doc: new section in upgrading guide about upcoming changes

4 years agoMerge branch 'luarocks-install-version' into 'master'
Petr Špaček [Mon, 7 Sep 2020 14:48:41 +0000 (16:48 +0200)] 
Merge branch 'luarocks-install-version' into 'master'

scripts, docs: specify lua version in `luarocks install`

Closes #601

See merge request knot/knot-resolver!1052

4 years agoscripts, docs: specify lua version in `luarocks install`
Vladimír Čunát [Mon, 31 Aug 2020 07:29:44 +0000 (09:29 +0200)] 
scripts, docs: specify lua version in `luarocks install`

On some systems luarocks defaults to other lua version (e.g. Fedora),
so the result would not be usable from kresd.  I didn't touch scripts
for older distro versions (Debian < 10, Ubuntu < 20.04, CentOS 7).

4 years agoMerge branch 'libdnssec-3.0' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1055 obs-knot-dns-deve-jq0xxt/deployments/1058 obs-knot-dns-deve-jq0xxt/deployments/1061 obs-knot-dns-deve-jq0xxt/deployments/1063 obs-knot-dns-deve-jq0xxt/deployments/1064 obs-knot-dns-deve-jq0xxt/deployments/1066 obs-knot-resolver-bs4hbr/deployments/1059 obs-knot-resolver-es11k1/deployments/1056 obs-knot-resolver-es11k1/deployments/1057 obs-knot-resolver-es11k1/deployments/1060 obs-knot-resolver-es11k1/deployments/1062 obs-knot-resolver-es11k1/deployments/1065 obs-knot-resolver-es11k1/deployments/1067
Tomas Krizek [Tue, 1 Sep 2020 14:54:11 +0000 (16:54 +0200)] 
Merge branch 'libdnssec-3.0' into 'master'

lib/dnssec: fix build against libdnssec 3.0

See merge request knot/knot-resolver!1053

4 years agolib/dnssec: fix build against libdnssec 3.0
Vladimír Čunát [Tue, 1 Sep 2020 10:44:15 +0000 (12:44 +0200)] 
lib/dnssec: fix build against libdnssec 3.0

It hasn't been released yet, but this patch fixes build against
current Knot master already.

4 years agoMerge branch 'lib-queue-bugs' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1044 obs-knot-dns-deve-jq0xxt/deployments/1045 obs-knot-dns-deve-jq0xxt/deployments/1048 obs-knot-dns-deve-jq0xxt/deployments/1049 obs-knot-dns-deve-jq0xxt/deployments/1053 obs-knot-resolver-es11k1/deployments/1043 obs-knot-resolver-es11k1/deployments/1046 obs-knot-resolver-es11k1/deployments/1047 obs-knot-resolver-es11k1/deployments/1050 obs-knot-resolver-es11k1/deployments/1052
Tomas Krizek [Thu, 27 Aug 2020 09:42:46 +0000 (11:42 +0200)] 
Merge branch 'lib-queue-bugs' into 'master'

lib/generic/queue: fix a bug + minor changes

See merge request knot/knot-resolver!1050

4 years agolib/generic/queue: remove "unused code", add comments
Vladimír Čunát [Mon, 10 Aug 2020 15:47:44 +0000 (17:47 +0200)] 
lib/generic/queue: remove "unused code", add comments

... and most importantly, review all the code.

Detail: queue_{head,tail}_impl() no longer "safely return" NULL
on an empty queue, as the API always dereferences the returned
pointer anyway.

4 years agolib/generic/queue: move KR_EXPORT to header
Vladimír Čunát [Mon, 10 Aug 2020 14:51:27 +0000 (16:51 +0200)] 
lib/generic/queue: move KR_EXPORT to header

It... feels better that way.

4 years agolib/generic/queue: fix a bug
Vladimír Čunát [Mon, 10 Aug 2020 12:26:59 +0000 (14:26 +0200)] 
lib/generic/queue: fix a bug

Emptying the queue and using it again... didn't work :-(
Fortunately, no use case in kresd so far could trigger this, I believe:
 - struct session::waiting is a list of tasks waiting
   while connection is being established
 - the temporary queue in session_tasklist_finalize_expired() is also
   only once filled and emptied

4 years agoMerge !1041: daemon: rename tls_ctx and tls_client_ctx structs obs-knot-dns-deve-jq0xxt/deployments/1039 obs-knot-dns-deve-jq0xxt/deployments/1042 obs-knot-resolver-es11k1/deployments/1040 obs-knot-resolver-es11k1/deployments/1041
Vladimír Čunát [Tue, 25 Aug 2020 08:04:45 +0000 (10:04 +0200)] 
Merge !1041: daemon: rename tls_ctx and tls_client_ctx structs

4 years agodaemon: rename tls_ctx and tls_client_ctx structs
Tomas Krizek [Fri, 14 Aug 2020 12:09:56 +0000 (14:09 +0200)] 
daemon: rename tls_ctx and tls_client_ctx structs

The trailing _t implies the type is a typedef like:

typedef struct tls_ctx {
...
} tls_ctx_t;

But it is a plain struct - so remove it to avoid confusion.

4 years agoMerge !1046: lua: clarify event.recurrent() API
Vladimír Čunát [Tue, 25 Aug 2020 07:21:45 +0000 (09:21 +0200)] 
Merge !1046: lua: clarify event.recurrent() API

4 years agolua: clarify event.recurrent() API
Petr Špaček [Tue, 18 Aug 2020 07:42:56 +0000 (09:42 +0200)] 
lua: clarify event.recurrent() API

It was rather confusing:
- event.after(0, ...) executed function immediatelly
- event.recurrent(0, ...) executed function immediatelly (seemingly worked)
  but stoped after the first execution, i.e. no recurrence took place.

4 years agoMerge branch 'config_tests' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1037 obs-knot-resolver-es11k1/deployments/1038
Tomas Krizek [Mon, 24 Aug 2020 08:50:08 +0000 (10:50 +0200)] 
Merge branch 'config_tests' into 'master'

config test improvements

See merge request knot/knot-resolver!1045

4 years agotests: kill background tasks when config test exits
Petr Špaček [Mon, 17 Aug 2020 12:24:19 +0000 (14:24 +0200)] 
tests: kill background tasks when config test exits

In theory there should be no background task but we need cleanup in case
kresd gets into infinite loop or something like that.

4 years agoMerge !1043: CONTRIBUTING: document our sub-optimal MR process obs-knot-dns-deve-jq0xxt/deployments/1031 obs-knot-dns-deve-jq0xxt/deployments/1033 obs-knot-dns-deve-jq0xxt/deployments/1035 obs-knot-resolver-es11k1/deployments/1032 obs-knot-resolver-es11k1/deployments/1034 obs-knot-resolver-es11k1/deployments/1036
Vladimír Čunát [Fri, 21 Aug 2020 10:09:39 +0000 (12:09 +0200)] 
Merge !1043: CONTRIBUTING: document our sub-optimal MR process

Fixes #596.

4 years agoCONTRIBUTING: document our suboptimal MR process
Tomas Krizek [Mon, 17 Aug 2020 08:37:45 +0000 (10:37 +0200)] 
CONTRIBUTING: document our suboptimal MR process

4 years agoMerge branch 'distrotests-fix-perms' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1025 obs-knot-dns-deve-jq0xxt/deployments/1027 obs-knot-dns-deve-jq0xxt/deployments/1029 obs-knot-resolver-es11k1/deployments/1026 obs-knot-resolver-es11k1/deployments/1028 obs-knot-resolver-es11k1/deployments/1030
Tomas Krizek [Tue, 18 Aug 2020 08:22:47 +0000 (10:22 +0200)] 
Merge branch 'distrotests-fix-perms' into 'master'

distro/tests: fix file permissions set by ansible

See merge request knot/knot-resolver!1044

4 years agodistro/tests: fix file permissions set by ansible obs-knot-resolver-bs4hbr/deployments/1022
Tomas Krizek [Mon, 17 Aug 2020 12:28:43 +0000 (14:28 +0200)] 
distro/tests: fix file permissions set by ansible

Ansible switched default file perm to 600 from more permissive 666. Add
file mode explicitly to avoid issues.

4 years agoMerge branch 'policy_answer_doc' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1023 obs-knot-resolver-es11k1/deployments/1024
Petr Špaček [Mon, 17 Aug 2020 08:12:19 +0000 (10:12 +0200)] 
Merge branch 'policy_answer_doc' into 'master'

docs: clarify policy.ANSWER

See merge request knot/knot-resolver!1037

4 years agomodules/policy: unify code-block formatting and indentation
Tomas Krizek [Fri, 14 Aug 2020 11:58:48 +0000 (13:58 +0200)] 
modules/policy: unify code-block formatting and indentation

4 years agomodules/policy: fix typo and reformat example
Tomas Krizek [Fri, 14 Aug 2020 11:47:17 +0000 (13:47 +0200)] 
modules/policy: fix typo and reformat example

4 years agodocs: clarify policy.ANSWER
Petr Špaček [Thu, 13 Aug 2020 07:28:53 +0000 (09:28 +0200)] 
docs: clarify policy.ANSWER

4 years agoMerge branch 'cache_debug' into 'master'
Petr Špaček [Mon, 17 Aug 2020 08:07:05 +0000 (10:07 +0200)] 
Merge branch 'cache_debug' into 'master'

script to gather data from systemd journal

See merge request knot/knot-resolver!1040

4 years agoscripts/bugreport-journals: pythonize the script
Tomas Krizek [Fri, 14 Aug 2020 16:16:46 +0000 (18:16 +0200)] 
scripts/bugreport-journals: pythonize the script

4 years agoscript to gather data from systemd journal
Petr Špaček [Fri, 14 Aug 2020 08:14:27 +0000 (10:14 +0200)] 
script to gather data from systemd journal

4 years agoMerge branch 'ci-deckard-check' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1014 obs-knot-dns-deve-jq0xxt/deployments/1016 obs-knot-dns-deve-jq0xxt/deployments/1018 obs-knot-dns-deve-jq0xxt/deployments/1020 obs-knot-resolver-es11k1/deployments/1015 obs-knot-resolver-es11k1/deployments/1017 obs-knot-resolver-es11k1/deployments/1019 obs-knot-resolver-es11k1/deployments/1021
Štěpán Balážik [Thu, 13 Aug 2020 12:32:47 +0000 (14:32 +0200)] 
Merge branch 'ci-deckard-check' into 'master'

ci: check whether Deckard submodule commit is present on master

See merge request knot/knot-resolver!1038

4 years agoci: check whether Deckard submodule commit is present on master
Štěpán Balážik [Thu, 13 Aug 2020 11:08:16 +0000 (13:08 +0200)] 
ci: check whether Deckard submodule commit is present on master

This is to prevent issues like https://gitlab.nic.cz/knot/knot-resolver/-/merge_requests/1036

4 years agoMerge branch 'fix-broken-rfc5011-rollover' into 'master'
Petr Špaček [Thu, 13 Aug 2020 10:26:44 +0000 (12:26 +0200)] 
Merge branch 'fix-broken-rfc5011-rollover' into 'master'

Fix RFC5011 rollover

See merge request knot/knot-resolver!1035

4 years agomodules/ta_update: resurrect RFC5011 test removed from deckard
Lukáš Ježek [Tue, 11 Aug 2020 11:39:51 +0000 (13:39 +0200)] 
modules/ta_update: resurrect RFC5011 test removed from deckard

4 years agomodules/ta_update: fix broken RFC5011 rollover
Lukáš Ježek [Fri, 7 Aug 2020 09:10:58 +0000 (11:10 +0200)] 
modules/ta_update: fix broken RFC5011 rollover

4 years agomodules/ta_update: indent correction
Lukáš Ježek [Fri, 7 Aug 2020 09:06:23 +0000 (11:06 +0200)] 
modules/ta_update: indent correction

4 years agoMerge branch 'ci-deckard-divergent-commit' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1010 obs-knot-dns-deve-jq0xxt/deployments/1012 obs-knot-resolver-es11k1/deployments/1011 obs-knot-resolver-es11k1/deployments/1013
Štěpán Balážik [Tue, 11 Aug 2020 14:31:24 +0000 (16:31 +0200)] 
Merge branch 'ci-deckard-divergent-commit' into 'master'

ci: fix divergent commit in Deckard submodule

See merge request knot/knot-resolver!1036

4 years agoci: fix divergent commit in Deckard submodule
Štěpán Balážik [Tue, 11 Aug 2020 14:18:27 +0000 (16:18 +0200)] 
ci: fix divergent commit in Deckard submodule

Branch on Deckard tree tracked in this repository was left unmerged in
Deckard. The two trees therefore diverged and broke CI in knot-resolver
repo on a few commits retroactively.

4 years agoMerge branch 'validate-missing-rrsig' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1008 obs-knot-resolver-es11k1/deployments/1009
Petr Špaček [Mon, 10 Aug 2020 10:38:57 +0000 (12:38 +0200)] 
Merge branch 'validate-missing-rrsig' into 'master'

validator: new approach to missing RRSIG(s)

Closes #390

See merge request knot/knot-resolver!1020

4 years agoNEWS: reference also issue, not only merge request
Petr Špaček [Mon, 10 Aug 2020 10:12:32 +0000 (12:12 +0200)] 
NEWS: reference also issue, not only merge request

4 years agoresolve: minor logging improvements
Petr Špaček [Fri, 7 Aug 2020 11:43:01 +0000 (13:43 +0200)] 
resolve: minor logging improvements

4 years agopolicy.DEBUG: translate rank values to human readable names
Petr Špaček [Fri, 7 Aug 2020 08:47:49 +0000 (10:47 +0200)] 
policy.DEBUG: translate rank values to human readable names

It is very useful when debugging. This code gets executed only with
special DEBUG policy so we do not need to worry about maximum performance.

4 years agovalidate: improve precision of one "going insecure" log
Vladimír Čunát [Thu, 6 Aug 2020 16:18:30 +0000 (18:18 +0200)] 
validate: improve precision of one "going insecure" log

The line was being logged a bit prematurely when the validator isn't
really going insecure yet.  This solves (some of?) those cases.

4 years agovalidator: up->bottom chase DS if RRSIG(s) are missing
Petr Špaček [Fri, 24 Jul 2020 13:37:50 +0000 (15:37 +0200)] 
validator: up->bottom chase DS if RRSIG(s) are missing

The original approach was using SOA owner in negative answers
to optimize number of DS queries. This approarch is less realiable with
weird "servers", including pre-DNSSEC servers which reply to DS query
with an SOA owner pointing to the child zone instead of parent zone.

We now walk the tree from root down to find the missing DS or proof of
its non-existance.

4 years agovalidator: bottom->up chase DS if RRSIG(s) are missing
Vladimír Čunát [Thu, 2 Jul 2020 15:04:08 +0000 (17:04 +0200)] 
validator: bottom->up chase DS if RRSIG(s) are missing

This is about situations when validator *thinks* it's in a signed zone
but an unsigned answer comes in. The assumption was that RRSIGs didn't
make it through some middle-boxes and it retried with explicit QTYPE=RRSIG.

There were two issues with that.
1. It seems that in most cases the cause of the situation is that
   we skipped over a zone cut that transitioned to insecure state,
   so the signatures correctly don't exist.
2. An explicit RRSIG query appears to be more trouble than worth;
   it seems reasonable for servers not to answer it (fully);
   see RFC 8482 sect. 7.

The new approach simply tries to find a proof that the name is insecure,
by spawning a QTYPE=DS sub-query on that name.  That fixes some
real-life cases; usually this happens in iteration mode where one IP
address serves zones on both sides of a cut that transitions to insecure.
For details see new comments in that rrsig_not_found() function.

The change resulted in the iterator fallback not making sense anymore
so it was removed.

5 years agoMerge branch '510-prometheus-and-graphite-metrics-are-missing-some-cache-stats' into... obs-knot-dns-deve-jq0xxt/deployments/1000 obs-knot-dns-deve-jq0xxt/deployments/1002 obs-knot-dns-deve-jq0xxt/deployments/1004 obs-knot-dns-deve-jq0xxt/deployments/1006 obs-knot-resolver-es11k1/deployments/1001 obs-knot-resolver-es11k1/deployments/1003 obs-knot-resolver-es11k1/deployments/1005 obs-knot-resolver-es11k1/deployments/1007
Petr Špaček [Thu, 6 Aug 2020 09:40:27 +0000 (11:40 +0200)] 
Merge branch '510-prometheus-and-graphite-metrics-are-missing-some-cache-stats' into 'master'

cache: add number of entries to cache.stats()

Closes #510

See merge request knot/knot-resolver!1028

5 years agocache: add number of entries to cache.stats()
Lukáš Ježek [Fri, 24 Jul 2020 09:00:41 +0000 (11:00 +0200)] 
cache: add number of entries to cache.stats()

5 years agoMerge branch 'luajit-aarch64' into 'master'
Petr Špaček [Thu, 6 Aug 2020 09:29:16 +0000 (11:29 +0200)] 
Merge branch 'luajit-aarch64' into 'master'

daemon/lua: get rid of __engine symbol in lua

See merge request knot/knot-resolver!1033

5 years agodaemon: don't get worker from uv_loop_t::data anymore
Vladimír Čunát [Wed, 5 Aug 2020 16:11:07 +0000 (18:11 +0200)] 
daemon: don't get worker from uv_loop_t::data anymore

5 years agodaemon/bindings: get rid of engine_luaget()
Vladimír Čunát [Wed, 5 Aug 2020 15:55:58 +0000 (17:55 +0200)] 
daemon/bindings: get rid of engine_luaget()

Lots of lines affected, but it gets slightly simpler.

5 years agodaemon/lua: get rid of __engine symbol in lua
Vladimír Čunát [Mon, 3 Aug 2020 17:32:23 +0000 (19:32 +0200)] 
daemon/lua: get rid of __engine symbol in lua

In particular this gets rid of last light user data inside kresd.

It was still causing problems on some systems, for example Debian Sid.
The error was the same: "bad light userdata pointer" from luajit,
but note that the problem can still be triggered by lua libraries,
e.g. cqueues.

5 years agoMerge branch 'doc-worker-stats' into 'master' obs-knot-dns-deve-jq0xxt/deployments/998 obs-knot-resolver-bs4hbr/deployments/997 obs-knot-resolver-es11k1/deployments/999
Tomas Krizek [Wed, 5 Aug 2020 10:44:12 +0000 (12:44 +0200)] 
Merge branch 'doc-worker-stats' into 'master'

doc: include worker.stats() description

See merge request knot/knot-resolver!1034

5 years agodoc: include worker.stats() description
Vladimír Čunát [Wed, 5 Aug 2020 10:05:29 +0000 (12:05 +0200)] 
doc: include worker.stats() description

5 years agoMerge branch 'ci_update' into 'master' obs-knot-dns-deve-jq0xxt/deployments/993 obs-knot-dns-deve-jq0xxt/deployments/995 obs-knot-resolver-es11k1/deployments/994 obs-knot-resolver-es11k1/deployments/996
Petr Špaček [Mon, 3 Aug 2020 14:17:55 +0000 (16:17 +0200)] 
Merge branch 'ci_update' into 'master'

CI docker image update

See merge request knot/knot-resolver!1032

5 years agoci: avoid broken py.test 6.0.0 and dnspython 2.0.0 which causes linting errors
Petr Špaček [Mon, 3 Aug 2020 12:15:07 +0000 (14:15 +0200)] 
ci: avoid broken py.test 6.0.0 and dnspython 2.0.0 which causes linting errors

References:
- https://github.com/pytest-dev/pytest/pull/7565
- https://github.com/rthalley/dnspython/pull/561

5 years agoci: add tcpdump for Deckard to Debian image
Petr Špaček [Wed, 29 Jul 2020 12:07:08 +0000 (14:07 +0200)] 
ci: add tcpdump for Deckard to Debian image

5 years agoMerge !1031: kr_pkt_text: accept OPT anywhere in ADDITIONAL
Vladimír Čunát [Mon, 3 Aug 2020 10:51:32 +0000 (12:51 +0200)] 
Merge !1031: kr_pkt_text: accept OPT anywhere in ADDITIONAL

5 years agodeckard: update to fix in CI (new dnspython in image)
Vladimír Čunát [Mon, 3 Aug 2020 10:34:20 +0000 (12:34 +0200)] 
deckard: update to fix in CI (new dnspython in image)