]>
git.ipfire.org Git - thirdparty/knot-resolver.git/log
Petr Špaček [Mon, 27 Nov 2017 10:14:51 +0000 (11:14 +0100)]
Merge branch 'docker-updates' into 'master'
CI: unify Docker images for kresd and Deckard CI
See merge request knot/knot-resolver!404
Petr Špaček [Mon, 27 Nov 2017 10:10:09 +0000 (11:10 +0100)]
CI: unify Docker images for kresd and Deckard CI
The Docker image now should work for both projects.
Also, the image was extended with tools to measure code coverage.
Vladimír Čunát [Fri, 24 Nov 2017 13:45:01 +0000 (14:45 +0100)]
temporarily enable packet caching for NSEC3 answers
Work up to this commit was squashed into cache-aggr
36302052 .
Petr Špaček [Fri, 24 Nov 2017 14:56:51 +0000 (15:56 +0100)]
Merge branch 'lualint' into 'master'
CI: add Lua lint and installcheck tests
See merge request knot/knot-resolver!402
Petr Špaček [Fri, 24 Nov 2017 14:48:56 +0000 (15:48 +0100)]
fixup! tests: fixed config tests locking up on error, added test for predict
/bin/sh in our image does not support "function" keyword
Petr Špaček [Fri, 24 Nov 2017 14:15:25 +0000 (15:15 +0100)]
CI: run installcheck tests with and without Valgrind
Petr Špaček [Fri, 24 Nov 2017 13:55:35 +0000 (14:55 +0100)]
CI: disable Deckard under Valgrind
The test is useless in its current form because all the information goes
to logs, which are later discarded.
We need to fix issues detected by Valgrind first and then enable strict
mode which will not let the test pass if any problem is detected.
This might require recompiling LuaJIT in a way which is compatible with
Valgrind.
Petr Špaček [Fri, 24 Nov 2017 13:54:34 +0000 (14:54 +0100)]
CI: disallow Valgrind failures in unit tests
Petr Špaček [Fri, 24 Nov 2017 13:05:42 +0000 (14:05 +0100)]
CI: add Lua lint
Vladimír Čunát [Fri, 24 Nov 2017 12:43:39 +0000 (13:43 +0100)]
generate positive wildcard answers as well
Vladimír Čunát [Fri, 24 Nov 2017 10:25:41 +0000 (11:25 +0100)]
nitpicks
Petr Špaček [Fri, 24 Nov 2017 07:52:59 +0000 (08:52 +0100)]
Merge branch 'daemon-lua-linter-fixes' into 'master'
Fixed linter issues in `daemon/lua`, added more config tests
See merge request knot/knot-resolver!400
Petr Špaček [Fri, 24 Nov 2017 07:46:59 +0000 (08:46 +0100)]
Merge branch 'fix-obvious-linter-problems' into 'daemon-lua-linter-fixes'
fixed obvious linter problems
See merge request knot/knot-resolver!401
Marek Vavruša [Fri, 24 Nov 2017 05:07:31 +0000 (21:07 -0800)]
fixed obvious linter problems
there are two modules that couldn't work before:
* graphite
* ketcd
Marek Vavruša [Thu, 23 Nov 2017 09:02:15 +0000 (01:02 -0800)]
daemon/lua: fixed unused variables, whitespace, cleanup
Also fixed improper promotion of `ffi` to global variable.
```
$ luacheck --codes daemon/lua/
Checking daemon/lua/config.lua OK
Checking daemon/lua/kres-gen.lua OK
Checking daemon/lua/kres.lua OK
Checking daemon/lua/sandbox.lua OK
Checking daemon/lua/trust_anchors.lua OK
Checking daemon/lua/zonefile.lua OK
Total: 0 warnings / 0 errors in 6 files
```
Marek Vavruša [Thu, 23 Nov 2017 08:59:31 +0000 (00:59 -0800)]
added basic config test for consts, depend on knot >= 2.4, cleanup
The library now depends on libknot >= 2.4.0 (in Debian stable),
this allows us to remove a dead code and sed-ing of the kres.lua
Added a basic config tests to check that constants still work,
and basic interface to rrsets still works after the change.
Petr Špaček [Fri, 24 Nov 2017 07:18:12 +0000 (08:18 +0100)]
Merge branch 'fix-predict-module' into 'master'
Fixed predict module, config tests, cleanup
See merge request knot/knot-resolver!399
Marek Vavruša [Fri, 24 Nov 2017 04:32:01 +0000 (20:32 -0800)]
modules/predict: added test for prediction process
this tests that:
* sampling frequent queries works
* the code to find periodic appearences of the same name and type
* resolving predicted queries works
it doesn't test pessimistic cases or failure modes
Marek Vavruša [Fri, 24 Nov 2017 04:30:00 +0000 (20:30 -0800)]
tests/config: added basic assert support (compatible with busted)
There is no dependency on a testing library yet, so I added a
basic interface for mocking and asserting test values to get
something to start with. I'll probably replace it with busted
or telescope later on to get nicer testing output.
Marek Vavruša [Fri, 24 Nov 2017 03:31:55 +0000 (19:31 -0800)]
renamed TEST env variable to KRESD_NO_LISTEN
Marek Vavruša [Thu, 23 Nov 2017 07:50:58 +0000 (23:50 -0800)]
converted constant tables, support kres.type.TYPE1234
The difficulty with using structs as constant tables is that access
to non-existent fields throws an error. This is difficult to handle
without wrapping every access in a pcall, for example in predict module:
```
error: /usr/local/lib/kdns_modules/predict.lua:34: 'struct rr_type' has no member named 'TYPE65535'
```
So I converted the constant tables into regular Lua tables,
and added a metatable for RR types to allow looking up unnamed types,
in the TYPE%d format. Looking up non-existent fields will now
return nil instead of throwing an error.
Marek Vavruša [Thu, 23 Nov 2017 07:55:31 +0000 (23:55 -0800)]
modules/predict: cleaned up unused function, variables, trailing whitespace
The `stats` module is now also included if not exists.
```
$ luacheck modules/predict
Checking modules/predict/predict.lua OK
Total: 0 warnings / 0 errors in 1 file
```
Marek Vavruša [Thu, 23 Nov 2017 07:40:28 +0000 (23:40 -0800)]
tests: fixed config tests locking up on error, added test for predict
The config tests locked up on error as if error was raised from the
event callback, it would never reach the `quit()` statement, so
server would never close on error.
Added a script to make running these types of tests a little bit nicer
and to allow concurrent execution of config tests.
Added a test for the predict module, that fails on prediction
of unknown types:
```
error: /usr/local/lib/kdns_modules/predict.lua:34: 'struct rr_type' has no member named 'TYPE65535'
```
Petr Špaček [Thu, 23 Nov 2017 16:10:00 +0000 (17:10 +0100)]
Merge branch 'add-lua-linter' into 'master'
Added luacheck for linting Lua files and static analysis
See merge request knot/knot-resolver!398
Vladimír Čunát [Thu, 23 Nov 2017 07:22:55 +0000 (08:22 +0100)]
do cache_sync at the end of cache_peek
We do no writing in that phase (yet), but let's do it anyway.
Vladimír Čunát [Thu, 23 Nov 2017 07:18:19 +0000 (08:18 +0100)]
lmdb write fix
Fix incorrectly computed bound, leading to writes beyond the buffer
returned by lmdb, resulting in all kinds of weird errors later.
Marek Vavruša [Thu, 23 Nov 2017 02:57:39 +0000 (18:57 -0800)]
Added luacheck for linting Lua files and static analysis
This is super useful for checking things like misusing undefined
variables or modifying globals, especially in modules when it's
not immediately visible which variables are in the global
namespace and which are not.
I added several exceptions for files in daemon/lua and tests,
as for example sandbox module needs to legitimately modify
global namespace.
There's a lot of things failing, so I didn't make it part of the
standard `make check`, but we should eventually enable it to
improve code quality and spot problems with CI.
Vladimír Čunát [Wed, 22 Nov 2017 14:03:51 +0000 (15:03 +0100)]
set ranks of RRSIGs to _OMIT
Otherwise the validator may get confused, trying to "validate" them.
Vladimír Čunát [Wed, 22 Nov 2017 12:48:16 +0000 (13:48 +0100)]
cache: stash packets also if there's no TA at all
Vladimír Čunát [Wed, 22 Nov 2017 12:08:43 +0000 (13:08 +0100)]
review TTL limit handling
- aggressive cache forgot to apply the maximum TTL bound
- packet cache had a separate ad-hoc limit of 15 minutes;
this got removed
- cleanups, etc.
Vladimír Čunát [Tue, 21 Nov 2017 18:12:25 +0000 (19:12 +0100)]
commit the regenerated lua stuff, finally
Vladimír Čunát [Tue, 21 Nov 2017 18:11:28 +0000 (19:11 +0100)]
move NSEC1-related stuff into a separate file
Also some minor changes, as usual.
Vladimír Čunát [Tue, 21 Nov 2017 14:55:47 +0000 (15:55 +0100)]
WIP: wildcards
- minor fix
- improved verbose logging
- other nitpicks
Negative NSEC wildcards should be hopefully OK now.
No generation of positive answers from wildcards yet.
Vladimír Čunát [Mon, 20 Nov 2017 18:52:06 +0000 (19:52 +0100)]
WIP: wildcards
Petr Špaček [Mon, 20 Nov 2017 16:45:28 +0000 (17:45 +0100)]
Merge branch 'deckard_fail_artifacts' into 'master'
CI optimization
Closes #270
See merge request knot/knot-resolver!397
Vladimír Čunát [Mon, 20 Nov 2017 15:50:02 +0000 (16:50 +0100)]
fix rcode for some negative answers
Empty non-terminals don't need to have a matching NSEC record.
Petr Špaček [Mon, 20 Nov 2017 15:35:06 +0000 (16:35 +0100)]
CI: enable QTRACE logging for kresd
Petr Špaček [Mon, 20 Nov 2017 15:33:38 +0000 (16:33 +0100)]
CI: run non-interactive kresd to avoid false positives
See Deckard MR!85 for details.
Petr Špaček [Mon, 20 Nov 2017 15:31:54 +0000 (16:31 +0100)]
CI: archive Deckard artifacts on failure
Petr Špaček [Thu, 16 Nov 2017 13:23:56 +0000 (14:23 +0100)]
CI: optimize Deckard-under-Valgrind
Packages are already present in the image so we do not need to spend
time on package maintenance.
Vladimír Čunát [Mon, 20 Nov 2017 15:14:22 +0000 (16:14 +0100)]
fix another bug for non-root zones
Sigh.
Vladimír Čunát [Mon, 20 Nov 2017 13:41:15 +0000 (14:41 +0100)]
Merge !396: lua: fixup making the bindings bogus
Vladimír Čunát [Mon, 20 Nov 2017 13:23:24 +0000 (14:23 +0100)]
lua: fixup making the bindings bogus
For now I didn't touch the generator to be correct on this line,
as we will probably want to change it after bumping minimal libknot
version.
Vladimír Čunát [Mon, 20 Nov 2017 13:12:48 +0000 (14:12 +0100)]
Merge !395: minor fixes (see commits)
Vladimír Čunát [Mon, 20 Nov 2017 13:07:46 +0000 (14:07 +0100)]
lua: fix mistakes in bindings (forgotten regeneration)
Vladimír Čunát [Tue, 14 Nov 2017 13:18:43 +0000 (14:18 +0100)]
daemon: fix a typo in SIGPIPE blocking
I'm sorry. Buggy commit:
2ba2a5e8
Vladimír Čunát [Thu, 16 Nov 2017 17:25:19 +0000 (18:25 +0100)]
NSEC: better verbose logging + nitpicks
Vladimír Čunát [Thu, 16 Nov 2017 16:54:28 +0000 (17:54 +0100)]
Merge !394: util: fix policy.QTRACE for QDCOUNT != 1
Petr Špaček [Thu, 16 Nov 2017 16:41:32 +0000 (17:41 +0100)]
util: fix policy.QTRACE for QDCOUNT != 1
Vladimír Čunát [Thu, 16 Nov 2017 16:04:13 +0000 (17:04 +0100)]
Merge !393: lua resolve(): make DNSSEC_WANT imply +dnssec
Vladimír Čunát [Thu, 16 Nov 2017 15:32:12 +0000 (16:32 +0100)]
lua resolve(): make DNSSEC_WANT imply +dnssec
Vladimír Čunát [Thu, 16 Nov 2017 14:09:59 +0000 (15:09 +0100)]
rename module 'cache_lmdb' -> 'cache'
The name was weird. There's no other implementation ATM and the module
will always be only really suitable for *local* caches, but otherwise
it's not neccessarily bound to LMDB.
Vladimír Čunát [Wed, 15 Nov 2017 10:21:47 +0000 (11:21 +0100)]
fix a bug for non-root zones
Owner name reconstruction didn't work.
Vladimír Čunát [Wed, 15 Nov 2017 09:07:44 +0000 (10:07 +0100)]
Merge !390: utils kr_strcatdup: deal with overflow
Vladimír Čunát [Wed, 15 Nov 2017 08:48:29 +0000 (09:48 +0100)]
utils kr_strcatdup: deal with overflowing size_t
It's very unlikely to happen - sum of string lengths overflowing -
even on a 32-bit platform, and the input seems not controllable by
adversaries, but let's fix it anyway.
Vladimír Čunát [Tue, 14 Nov 2017 17:05:27 +0000 (18:05 +0100)]
minor: cleanups, logging, fixes, comments/docs
Petr Špaček [Mon, 13 Nov 2017 13:12:26 +0000 (14:12 +0100)]
Merge branch 'fix-check-config' into 'master'
Fix check target (check-config requires installed version of kresd)
Closes #272
See merge request knot/knot-resolver!389
Petr Špaček [Mon, 13 Nov 2017 12:55:29 +0000 (13:55 +0100)]
tests: check-config and check-integration require installed version
Path to module directory gets hardcoded into binaries so check-config
and check-integration cannot work prior installation.
To indicate this depedency, the target check-config was moved from
"check" target to "installcheck".
Deckard requires additional libraries so it is not included in
installcheck.
fixes: #272
Petr Špaček [Mon, 13 Nov 2017 12:43:29 +0000 (13:43 +0100)]
unit tests: always use libraries from build directory
Previously it might happen that installed libraries
had higher priority over libraries in build directory.
Vladimír Čunát [Mon, 13 Nov 2017 09:50:46 +0000 (10:50 +0100)]
Merge !388: minor fixes
Vladimír Čunát [Mon, 13 Nov 2017 09:41:25 +0000 (10:41 +0100)]
tests_cache: give it more space
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=878976
In general, platforms with page size other than 4k might better compile
with -DCPU_PAGE_SIZE=nnnnn but real impact should only be this test and
better alignment in the mempool allocator.
Vladimír Čunát [Mon, 13 Nov 2017 09:24:53 +0000 (10:24 +0100)]
daemon: block SIGPIPE
We can ignore the signal, as the affected libuv calls report error
by returning EPIPE anyway.
Fixes https://gitlab.labs.nic.cz/knot/knot-resolver/issues/271
Vladimír Čunát [Fri, 10 Nov 2017 16:52:17 +0000 (17:52 +0100)]
minor cleanups, reduce verbosity
Vladimír Čunát [Fri, 10 Nov 2017 16:31:35 +0000 (17:31 +0100)]
remove some old code
Vladimír Čunát [Fri, 10 Nov 2017 15:38:22 +0000 (16:38 +0100)]
memcached, redis: disable as they won't work ATM
Vladimír Čunát [Fri, 10 Nov 2017 15:20:25 +0000 (16:20 +0100)]
RR-stashing nitpicks
Vladimír Čunát [Fri, 10 Nov 2017 15:04:38 +0000 (16:04 +0100)]
preparing knot_pkt_t: move to a separate file
Vladimír Čunát [Fri, 10 Nov 2017 14:41:39 +0000 (15:41 +0100)]
RR (de)serialization: move to a separate file
Vladimír Čunát [Fri, 10 Nov 2017 14:05:16 +0000 (15:05 +0100)]
cache entry lists: move to a separate file
Vladimír Čunát [Fri, 10 Nov 2017 10:14:53 +0000 (11:14 +0100)]
fix clang warnings
Vladimír Čunát [Fri, 10 Nov 2017 10:12:01 +0000 (11:12 +0100)]
packet cache: move into a separate file, describe API
Vladimír Čunát [Fri, 10 Nov 2017 09:02:42 +0000 (10:02 +0100)]
minor improvements, readability, clang compatibility
It doesn't accept `abs(10)` as a constant for `case` labels.
Vladimír Čunát [Thu, 9 Nov 2017 16:32:40 +0000 (17:32 +0100)]
add packet cache - only direct NAME+TYPE hit ATM
Used for queries that are BOGUS or
(negative and either insecure or unvalidated).
FIXME: review, opt-out, etc.
Vladimír Čunát [Thu, 9 Nov 2017 09:29:56 +0000 (10:29 +0100)]
cache API: for `read/write` the key is const, really
It might better be passed by value, but let me keep the way for now.
Vladimír Čunát [Wed, 8 Nov 2017 09:10:07 +0000 (10:10 +0100)]
Merge tag 'v1.5.0' into cache-aggr-wip
Petr Špaček [Mon, 6 Nov 2017 15:08:13 +0000 (16:08 +0100)]
Merge branch 'build-docs-submodules' into 'master'
Add note about initializing submodules needed to build successfully.
See merge request knot/knot-resolver!387
Stepan Balazik [Mon, 6 Nov 2017 14:55:08 +0000 (15:55 +0100)]
Add note about initializing submodules needed to build successfully.
Vladimír Čunát [Thu, 2 Nov 2017 11:37:43 +0000 (12:37 +0100)]
Merge !385: release 1.5.0
Vladimír Čunát [Thu, 2 Nov 2017 11:22:16 +0000 (12:22 +0100)]
release 1.5.0
Vladimír Čunát [Thu, 2 Nov 2017 11:19:16 +0000 (12:19 +0100)]
Merge !384: add KR_RANK_TRY
attempt validation for more records but require it for fewer of them
(e.g. avoids SERVFAIL when server adds extra records but omits RRSIGs)
Vladimír Čunát [Wed, 1 Nov 2017 15:36:34 +0000 (16:36 +0100)]
add KR_RANK_TRY
attempt validation for more records but require it for fewer of them
(e.g. avoids SERVFAIL when server adds extra records but omits RRSIGs)
Vladimír Čunát [Thu, 2 Nov 2017 11:07:57 +0000 (12:07 +0100)]
Merge !383: rfc8145: DNSSEC Key Tag Signaling (by default)
Vítězslav Kříž [Wed, 1 Nov 2017 17:52:40 +0000 (18:52 +0100)]
Signaling trust anchor is enabled by default
Vítězslav Kříž [Mon, 30 Oct 2017 15:59:37 +0000 (16:59 +0100)]
Signaling Trust Anchor Knowledge in DNSSEC using Key Tag Query
Implementation of RFC 8145 section 5 as module.
Fixes: #383
fixup! Signaling Trust Anchor Knowledge in DNSSEC using Key Tag Query
Petr Špaček [Wed, 1 Nov 2017 16:52:12 +0000 (17:52 +0100)]
daemon: add ability to load modules with _ in name
Vladimír Čunát [Thu, 26 Oct 2017 15:55:15 +0000 (17:55 +0200)]
release 1.99.1-alpha: WIP on aggressive cache
Vladimír Čunát [Thu, 26 Oct 2017 15:48:53 +0000 (17:48 +0200)]
NEWS for 1.99.1-alpha
Vladimír Čunát [Thu, 26 Oct 2017 15:32:28 +0000 (17:32 +0200)]
fix CNAMEs and some details
Vladimír Čunát [Thu, 26 Oct 2017 13:13:07 +0000 (15:13 +0200)]
stash xNAME RRs (not utilizing them yet)
and some smaller fixes
Vladimír Čunát [Wed, 25 Oct 2017 18:44:04 +0000 (20:44 +0200)]
negative wildcarded answers should be OK now
Vladimír Čunát [Wed, 25 Oct 2017 17:48:56 +0000 (19:48 +0200)]
kwz_between: fix a bug when one key is a prefix of another
Vladimír Čunát [Tue, 24 Oct 2017 16:08:50 +0000 (18:08 +0200)]
WIP on wildcards
including quite some refactoring of the new cache code
Vladimír Čunát [Tue, 24 Oct 2017 14:47:49 +0000 (16:47 +0200)]
Merge !381: etc/root.hints: B's IPv4 updated today
Vladimír Čunát [Tue, 24 Oct 2017 14:40:32 +0000 (16:40 +0200)]
etc/root.hints: B's IPv4 updated today
Petr Špaček [Tue, 24 Oct 2017 10:27:21 +0000 (12:27 +0200)]
Merge branch 'systemd-cleanup' into 'master'
systemd: drop RefuseManualStart=true, disable kresd.service by default
See merge request knot/knot-resolver!380
Vladimír Čunát [Tue, 24 Oct 2017 09:36:21 +0000 (11:36 +0200)]
skip zero-containing names
Vladimír Čunát [Mon, 23 Oct 2017 13:19:42 +0000 (15:19 +0200)]
fix some bugs around key->dname conversion
e.g. in _lf2wire
Vladimír Čunát [Fri, 20 Oct 2017 17:27:30 +0000 (19:27 +0200)]
remove unused code
Vladimír Čunát [Fri, 20 Oct 2017 17:00:49 +0000 (19:00 +0200)]
remove the old cache modules from git
Vladimír Čunát [Fri, 20 Oct 2017 16:59:48 +0000 (18:59 +0200)]
.
Root zone features seem usable now.