]>
git.ipfire.org Git - thirdparty/knot-resolver.git/log
Petr Špaček [Tue, 7 Apr 2020 13:55:52 +0000 (15:55 +0200)]
validator: use rank BOGUS where appropriate instead of MISSING
MISSING triggers re-query to auth in attempt to find missing RRSIGs.
It causes reduntant queries and also puts some BOGUS RRsets in answers.
(It sounds bad but we were correctly setting rcode=SERVFAIL and AD=0
even before this commit.)
Formerly RRSIG ranks did not reflect results of validation.
Now we mark them as BOGUS and upgrade them to SECURE if they validate.
New validator phase answer_finalize prevents BOGUS RRsets from being
put even into SERVFAIL answers.
Closes: #396
Petr Špaček [Tue, 14 Apr 2020 16:09:31 +0000 (18:09 +0200)]
Merge branch '194-support-rpz-cname-redirection' into 'master'
support arbitrary data in RPZ
See merge request knot/knot-resolver!964
Lukáš Ježek [Tue, 14 Apr 2020 08:33:38 +0000 (10:33 +0200)]
modules/policy: use origin and domain name as binary data
Lukáš Ježek [Mon, 6 Apr 2020 07:54:53 +0000 (09:54 +0200)]
modules/policy: Return NODATA on *. action in rpz file
Lukáš Ježek [Mon, 6 Apr 2020 07:09:21 +0000 (09:09 +0200)]
modules/policy/rpz: Correct work if RRset is suffixed zone name
Lukáš Ježek [Thu, 2 Apr 2020 12:38:13 +0000 (14:38 +0200)]
modules/policy: Add RPZ test
Lukáš Ježek [Wed, 1 Apr 2020 10:49:45 +0000 (12:49 +0200)]
modules/policy: Take multiple RR types from rpz file for a single domain name
Lukáš Ježek [Mon, 30 Mar 2020 10:02:05 +0000 (12:02 +0200)]
modules/policy: Overwrite rdata by rpz file
Lukáš Ježek [Thu, 26 Mar 2020 08:05:46 +0000 (09:05 +0100)]
modules/policy: Add ANSWER action
Tomas Krizek [Tue, 14 Apr 2020 14:49:26 +0000 (16:49 +0200)]
Merge branch 'pkg-varlib-permissions' into 'master'
systemd/tmpfiles: change directory owner to root
See merge request knot/knot-resolver!972
Tomas Krizek [Thu, 2 Apr 2020 13:29:56 +0000 (15:29 +0200)]
systemd/tmpfiles: change directory owner to root
Change the owner of kresd files to root:knot-resolver. This improves
behaviour for Fedora, where kresd can run under root (e.g. in Docker).
Otherwise, running kresd as root on Fedora would fail because of dropped
capabilities and attempting to access /var/lib/knot-resolver, which was
owned by knot-resolver.
This change makes it possible for both root (user) and knot-resolver
(group) to have the same permissions on these directories despite
dropped capabilities.
Tomas Krizek [Thu, 2 Apr 2020 13:29:41 +0000 (15:29 +0200)]
distro/rpm: make owner consistent with other dirs
Petr Špaček [Tue, 14 Apr 2020 08:16:35 +0000 (10:16 +0200)]
Merge branch 'cache-pkt-large' into 'master'
cache: fix large answers from packet cache
See merge request knot/knot-resolver!976
Vladimír Čunát [Thu, 9 Apr 2020 09:44:35 +0000 (11:44 +0200)]
cache: fix large answers from packet cache
Atomic packets larger than both 4k and net.bufsize() could not
be fetched from cache; now that's fixed in a minimalistic way.
(Minimalistic except for nitpicks like adding comments.)
Vladimír Čunát [Tue, 14 Apr 2020 07:23:53 +0000 (09:23 +0200)]
Merge !977: lua worker.bg_worker: also report missing cqueues
Fixes #562 (kind-of)
Petr Špaček [Tue, 14 Apr 2020 05:54:57 +0000 (07:54 +0200)]
lua worker: improve message when missing cqueues
Vladimír Čunát [Tue, 14 Apr 2020 05:55:29 +0000 (07:55 +0200)]
lua worker.bg_worker: also report missing cqueues
Otherwise people could get confusing errors like:
> attempt to index field 'bg_worker' (a nil value)
Tomas Krizek [Wed, 8 Apr 2020 10:23:18 +0000 (12:23 +0200)]
Merge branch 'rpm-centos8' into 'master'
distro/rpm: make spec centos8 compatible
See merge request knot/knot-resolver!973
Tomas Krizek [Wed, 8 Apr 2020 09:09:12 +0000 (11:09 +0200)]
ci: add obs:centos8 job
Tomas Krizek [Wed, 8 Apr 2020 09:07:15 +0000 (11:07 +0200)]
distro/tests: add centos8
Tomas Krizek [Fri, 3 Apr 2020 09:52:26 +0000 (11:52 +0200)]
distro/rpm: make spec centos8 compatible
Tomas Krizek [Fri, 3 Apr 2020 13:32:47 +0000 (15:32 +0200)]
Merge branch 'policy-postrules' into 'master'
policy postrules
Closes #556
See merge request knot/knot-resolver!969
Vladimír Čunát [Thu, 2 Apr 2020 07:46:50 +0000 (09:46 +0200)]
rebinding: deduplicate code of policy.REFUSE
Vladimír Čunát [Thu, 2 Apr 2020 07:01:11 +0000 (09:01 +0200)]
policy: fix qry parameter in postrules
Some rules need it and it was nil until now.
Vladimír Čunát [Wed, 4 Dec 2019 08:18:57 +0000 (09:18 +0100)]
modules/policy: make actions usable in postrules
DENY, DENY_MSG, DROP, REFUSE and TC will now clear the _selected RRs.
I believe that's what people usually expect of these actions anyway.
Tomas Krizek [Thu, 2 Apr 2020 12:33:49 +0000 (14:33 +0200)]
Merge branch 'modules-tests' into 'master'
modules/meson.build: move test definitions closer to modules
See merge request knot/knot-resolver!971
Vladimír Čunát [Thu, 2 Apr 2020 09:14:25 +0000 (11:14 +0200)]
modules/meson.build: move test definitions closer to modules
Vladimír Čunát [Thu, 2 Apr 2020 12:11:04 +0000 (14:11 +0200)]
Merge !966: daf and HTTP fixes
Closes #553.
Tomas Krizek [Wed, 1 Apr 2020 15:28:41 +0000 (17:28 +0200)]
daf: make protocol detection consistent with http module
Tomas Krizek [Wed, 1 Apr 2020 15:07:53 +0000 (17:07 +0200)]
daf: fix example in documentation
Tomas Krizek [Wed, 1 Apr 2020 12:53:22 +0000 (14:53 +0200)]
modules/daf: add warning since examples can be misleading
Tomas Krizek [Wed, 1 Apr 2020 12:37:17 +0000 (14:37 +0200)]
modules/daf: add some basic tests
Tomas Krizek [Wed, 1 Apr 2020 09:57:05 +0000 (11:57 +0200)]
modules/daf: fix pass, deny, drop and tc actions
Previously, all those actions caused resolver to return SERVFAIL,
because the lua code failed to evaluate.
Notably, deny action now properly returns NXDOMAIN instead of SERVFAIL.
The drop action still returns SERVFAIL.
Tomas Krizek [Wed, 1 Apr 2020 09:04:31 +0000 (11:04 +0200)]
daf/README: use proper syntax, not syntactic sugar
Petr Špaček [Wed, 1 Apr 2020 08:32:21 +0000 (10:32 +0200)]
http: update favicon to match Resolver colors
Old favicon used Knot DNS colors (dark blue) instead of Knot Resolver
colors (light blue).
Petr Špaček [Tue, 31 Mar 2020 15:31:00 +0000 (17:31 +0200)]
daf: fix add() handling of empty rule strings
Petr Špaček [Tue, 31 Mar 2020 15:29:53 +0000 (17:29 +0200)]
daf: config tests for HTTP API
Petr Špaček [Tue, 31 Mar 2020 14:12:49 +0000 (16:12 +0200)]
daf: remove ordering requirement between http and daf modules
Petr Špaček [Tue, 31 Mar 2020 14:11:53 +0000 (16:11 +0200)]
tests: avoid deprecated -f 1 in config tests, use -n
Omission in
a339ee10d71380f6c0779950b73dd3c419036135 .
Related: #529
Petr Špaček [Tue, 31 Mar 2020 14:01:47 +0000 (16:01 +0200)]
daf: fix HTTP DELETE
Rule ID is a number, not a string.
Petr Špaček [Tue, 31 Mar 2020 13:35:37 +0000 (15:35 +0200)]
http: also log results of HTTP requests
Jiří Helebrant [Tue, 31 Mar 2020 12:48:18 +0000 (14:48 +0200)]
daf: fix the ajax error callback for rule control
Petr Špaček [Tue, 31 Mar 2020 12:33:00 +0000 (14:33 +0200)]
daf: fix consensus() function to correctly detect empty answers
consensus() function is affected by
https://gitlab.labs.nic.cz/knot/knot-resolver/issues/554
so this fix helps only with single-instance scenarios.
Jiří Helebrant [Tue, 31 Mar 2020 09:40:47 +0000 (11:40 +0200)]
daf: fix the rule builder form
Petr Špaček [Tue, 31 Mar 2020 07:30:18 +0000 (09:30 +0200)]
http: log requests in verbose mode
Petr Špaček [Tue, 31 Mar 2020 07:02:16 +0000 (09:02 +0200)]
daf: fix HTTP API endpoints to work with webmgmt interface
It is broken at least since
1223599d1cb8d92f1ebe7100e926b8fe44bee2f2 ,
i.e. 4.0.0.
realPy [Mon, 30 Mar 2020 10:54:22 +0000 (12:54 +0200)]
daf: fix del method
The id rule is not the same as the index of the array.
Fixes: #553
Tomas Krizek [Thu, 2 Apr 2020 11:56:46 +0000 (13:56 +0200)]
Merge branch 'deckard_debug' into 'master'
tests: revert broken commits in Deckard repo
See merge request knot/knot-resolver!970
Petr Špaček [Thu, 2 Apr 2020 11:25:15 +0000 (13:25 +0200)]
tests: revert broken commits in Deckard repo
I don't know why exactly it fails ... let's unblock release.
Vladimír Čunát [Wed, 1 Apr 2020 10:17:01 +0000 (12:17 +0200)]
Merge !968: daemon: decrease tcp backlog to 128
Tomas Krizek [Tue, 31 Mar 2020 15:32:09 +0000 (17:32 +0200)]
daemon: decrease tcp backlog to 128
From our TCP benchmarks, values over 128 don't seem to have any
measurable benefits, even with hundreds of thousands of connections.
On the contrary, during very high TCP and CPU load, smaller backlog
seems to dramatically improve latency for clients that keep idle TCP
connections.
During normal/low load, smaller backlog doesn't seem to have any
benefits.
When measured against "aggressive" clients that immediately close the
TCP connection once their query is answered, backlog smaller than 128
was measured to hurt performance.
The application's backlog size is ultimately limited by
net.core.somaxconn, which has been set to 128 prior to Linux 5.4.
Therefore, this change only affects newer kernels and those who have
manually set this value to a higher size.
For more, see
https://gitlab.labs.nic.cz/knot/knot-resolver/-/merge_requests/968
Vladimír Čunát [Wed, 1 Apr 2020 09:34:59 +0000 (11:34 +0200)]
Merge !967: abort integration tests if sendmmsg is enabled
Petr Špaček [Wed, 1 Apr 2020 09:04:37 +0000 (11:04 +0200)]
Merge branch 'lua-resolve-opt' into 'master'
lua resolve(): correctly include EDNS0 in the virtual packet
See merge request knot/knot-resolver!963
Petr Špaček [Tue, 31 Mar 2020 09:43:00 +0000 (11:43 +0200)]
deckard: abort if sendmmsg/recvmmsg are in use
Deckard does not support these and it leads to confusing errors.
In long term we need to migrate Deckard to different network backend:
https://gitlab.labs.nic.cz/knot/deckard/issues/42
Vladimír Čunát [Fri, 27 Mar 2020 08:36:11 +0000 (09:36 +0100)]
lua resolve(): correctly include EDNS0 in the virtual packet
The new allocation approach isn't perfectly optimal, but it seems
relatively easy to understand and handles OOM conditions OK (I think).
Vladimír Čunát [Thu, 26 Mar 2020 13:44:58 +0000 (14:44 +0100)]
Merge !957: per-request verbose logging and debug log improvements
Vladimír Čunát [Thu, 26 Mar 2020 12:44:42 +0000 (13:44 +0100)]
lua: log RR ranks the same way as [cach] does
Petr Špaček [Wed, 25 Mar 2020 13:46:16 +0000 (14:46 +0100)]
policy.DEBUG: NEWS + upgrading
Petr Špaček [Wed, 25 Mar 2020 12:21:49 +0000 (13:21 +0100)]
policy.DEBUG_IF: avoid creating new callbacks on every request
This new approach uses per-request variables in Lua and creates new
callback for each DEBUG_IF call instead of each request.
Petr Špaček [Fri, 20 Mar 2020 14:59:58 +0000 (15:59 +0100)]
Dockerfile with one-shot mode
Intended usage: Quick resolution attempt with an empty cache.
export QNAME=...
export QTYPE=...
sudo -E docker run -e QNAME -e QTYPE krestest:latest '-n' '-c' '/etc/knot-resolver/kresd.conf'
Petr Špaček [Fri, 20 Mar 2020 13:40:44 +0000 (14:40 +0100)]
policy.DEBUG: fix to respect user-provided callbacks
It creates new callback functions for every request which
uses "callback chaining" but these should be rare.
Petr Špaček [Thu, 19 Mar 2020 07:13:06 +0000 (08:13 +0100)]
lua: expose cache miss detection in request objects
It seems there is no reason to keep this function private in policy
module.
Petr Špaček [Wed, 18 Mar 2020 14:38:57 +0000 (15:38 +0100)]
cache: remove forgotten log message "writing RRsets"
It did not log through request->trace_log and is not very useful anyway.
Petr Špaček [Wed, 18 Mar 2020 14:20:59 +0000 (15:20 +0100)]
validator: clarify message about signed non-authoritative data
Petr Špaček [Wed, 18 Mar 2020 13:03:13 +0000 (14:03 +0100)]
policy.DEBUG: add also policy.REQTRACE for printing incoming packets
Petr Špaček [Wed, 18 Mar 2020 11:22:24 +0000 (12:22 +0100)]
policy.DEBUG: generalize DEBUG_CACHE_MISS into DEBUG_IF
DEBUG_IF accepts user-supplied function which decides which requests
should be logged.
Petr Špaček [Mon, 16 Mar 2020 16:14:13 +0000 (17:14 +0100)]
policy: doc reorganization and clarification
Petr Špaček [Fri, 13 Mar 2020 17:23:33 +0000 (18:23 +0100)]
policy.DEBUG: log also final answer
Attempt to avoid duplicating ten lines in debug_logfinish_cb lead me
to splitting kr_log_qverbose_impl into two functions kr_log_q and kr_log_req.
This is another minor change to API exposed to modules.
Petr Špaček [Thu, 12 Mar 2020 12:41:49 +0000 (13:41 +0100)]
unify verbose logging and request tracing
Formerly both logs used slightly different formats and duplicated code.
From now on verbose log and request tracing are generated using the same
code.
This required a small change to request trace_log_f definition so it
might affect external modules.
Petr Špaček [Thu, 12 Mar 2020 10:08:12 +0000 (11:08 +0100)]
lua: helper functions for debug log
Petr Špaček [Wed, 11 Mar 2020 15:46:18 +0000 (16:46 +0100)]
debug: warn on qname letter case mismatch
We de-randomize qname letter case very early so kr_pkt_text() should see
all lowercase. Any uppercase means mismatch.
I've considered moving debug print to an earlier place but this way it
is more visible so I like more.
Petr Špaček [Wed, 11 Mar 2020 15:44:07 +0000 (16:44 +0100)]
iterate: log IP address sending mismatching answers
Štěpán Balážik [Wed, 11 Mar 2020 12:50:33 +0000 (13:50 +0100)]
daemon/worker: add logging to qr_task_step query cancelation
Tomas Krizek [Mon, 23 Mar 2020 13:35:45 +0000 (14:35 +0100)]
Merge branch 'strict-aliasing' into 'master'
fix strict aliasing problems
See merge request knot/knot-resolver!962
Vladimír Čunát [Mon, 23 Mar 2020 10:37:28 +0000 (11:37 +0100)]
meson.build: compile with -fno-strict-aliasing
I tested that older compilers don't refuse this option:
- gcc 4.8 (as that's the default in CentOS 7)
- llvm 3.8 (year 2016 is enough, I hope)
Vladimír Čunát [Fri, 20 Mar 2020 16:28:54 +0000 (17:28 +0100)]
lib/generic/array: fix a strict aliasing problem
The issue here is that `char *` is not allowed to alias
with `anyType *`. With gcc-10 in Fedora this now started
to cause real problems and loading stats module segfaulted.
Actually I can't see in standard (C11 6.5 par.7) that using `void *`
is guaranteed to be correct, but at least it seems fine with gcc,
and e.g. some standard functions like posix_memalign() use it
in the same "dangerous" way.
Tomas Krizek [Fri, 20 Mar 2020 13:35:45 +0000 (14:35 +0100)]
Merge branch 'ci-add-docker-py' into 'master'
ci/debian-buster: Add docker-py to docker image
See merge request knot/knot-resolver!961
Lukáš Ježek [Wed, 4 Mar 2020 13:14:40 +0000 (14:14 +0100)]
ci/debian-buster: Add docker-py to docker image
Tomas Krizek [Wed, 18 Mar 2020 17:13:00 +0000 (18:13 +0100)]
Merge branch 'ci-add-libnghttp2' into 'master'
ci/debian-buster: add libnghttp2 to docker image
See merge request knot/knot-resolver!960
Tomas Krizek [Wed, 18 Mar 2020 16:15:00 +0000 (17:15 +0100)]
ci/debian-buster: add libnghttp2 to docker image
Tomas Krizek [Tue, 17 Mar 2020 16:22:45 +0000 (17:22 +0100)]
Merge branch 'fix-leap-distrotest' into 'master'
distro/tests: failure to refresh Leap15 repo is non-critical
See merge request knot/knot-resolver!959
Tomas Krizek [Tue, 17 Mar 2020 15:48:24 +0000 (16:48 +0100)]
distro/tests: failure to refresh Leap15 repo is non-critical
Tomas Krizek [Tue, 17 Mar 2020 15:47:41 +0000 (16:47 +0100)]
distro/tests: update README
Tomas Krizek [Tue, 17 Mar 2020 14:01:17 +0000 (15:01 +0100)]
Merge branch 'doc-links' into 'master'
doc: fix a broken internal link
See merge request knot/knot-resolver!958
Vladimír Čunát [Mon, 16 Mar 2020 18:11:37 +0000 (19:11 +0100)]
doc: fix a broken internal link
Reported on Turris forums:
https://forum.turris.cz/t/dns-over-tcp-just-a-single-transaction/12003/21
Vladimír Čunát [Mon, 9 Mar 2020 17:20:51 +0000 (18:20 +0100)]
Merge !954: docs: better RPZ description (+fix watch)
Vladimír Čunát [Mon, 9 Mar 2020 15:57:53 +0000 (16:57 +0100)]
Merge !956: ci/travis: correctly print http error codes
Vladimír Čunát [Mon, 9 Mar 2020 15:50:38 +0000 (16:50 +0100)]
ci/travis: correctly print http error codes
Thanks to Tomas.
Tomas Krizek [Mon, 9 Mar 2020 13:48:02 +0000 (14:48 +0100)]
modules/policy: polict.rpz() shouldn't watch file when watch=false
Petr Špaček [Mon, 9 Mar 2020 13:22:05 +0000 (14:22 +0100)]
Merge branch 'compiler-warnings' into 'master'
compiler warning improvements
See merge request knot/knot-resolver!952
Petr Špaček [Mon, 9 Mar 2020 13:16:04 +0000 (14:16 +0100)]
docs: better RPZ description
Tomas Krizek [Mon, 9 Mar 2020 11:01:00 +0000 (12:01 +0100)]
Merge branch 'ci-disable-epel8-check' into 'master'
ci: disable build check for EPEL8 (still unresolvable)
See merge request knot/knot-resolver!953
Tomas Krizek [Mon, 9 Mar 2020 10:43:23 +0000 (11:43 +0100)]
ci: disable build check for EPEL8 (still unresolvable)
Vladimír Čunát [Thu, 27 Feb 2020 10:24:00 +0000 (11:24 +0100)]
make bad <lua.h> a hard informative error
Vladimír Čunát [Sun, 22 Dec 2019 09:24:49 +0000 (10:24 +0100)]
daemon/main: -Wformat in info message
Normally the types are equal, but that's not true e.g.
on 32-bit systems and macOS.
Vladimír Čunát [Tue, 25 Feb 2020 10:24:22 +0000 (11:24 +0100)]
meson: turn implicit-function warnings into hard errors
I just saw a case with bad luajit includes that linked successfully even
with some of the macros getting this warning.
Vladimír Čunát [Wed, 26 Feb 2020 14:50:07 +0000 (15:50 +0100)]
daemon/bindings/net: avoid -Wunused-variable on non-Linux
Vladimír Čunát [Fri, 6 Mar 2020 08:15:48 +0000 (09:15 +0100)]
Merge !951: NEWS: I forgot to re-classify the last change
Vladimír Čunát [Fri, 6 Mar 2020 08:14:22 +0000 (09:14 +0100)]
NEWS: I forgot to re-classify the last change
Vladimír Čunát [Fri, 6 Mar 2020 08:10:14 +0000 (09:10 +0100)]
Merge !949: FreeBSD-related improvements
Fixes #549