]>
git.ipfire.org Git - thirdparty/knot-resolver.git/log
Vladimír Čunát [Wed, 24 Jan 2018 14:03:15 +0000 (15:03 +0100)]
treewide: fix lower-casing of NSEC next name
Vladimír Čunát [Mon, 22 Jan 2018 13:19:55 +0000 (14:19 +0100)]
Merge branches 'regression-fix' and 'master'
Grigorii Demidov [Mon, 22 Jan 2018 12:42:29 +0000 (13:42 +0100)]
daemon/worker: cleanup errors; missed packet source
Vladimír Čunát [Mon, 22 Jan 2018 12:42:01 +0000 (13:42 +0100)]
Merge !453: merge tag 'v1.5.2', bringing security fixes
Vladimír Čunát [Mon, 22 Jan 2018 12:30:29 +0000 (13:30 +0100)]
Merge tag 'v1.5.2', bringing security fixes
Vladimír Čunát [Mon, 22 Jan 2018 10:45:44 +0000 (11:45 +0100)]
security release 1.5.2
Vladimír Čunát [Mon, 15 Jan 2018 17:08:47 +0000 (18:08 +0100)]
validator nitpick: remove a useless dead store
Discovered by clang scan.
Vladimír Čunát [Fri, 5 Jan 2018 09:15:43 +0000 (10:15 +0100)]
validator: fix NSEC* + delegation -> NXDOMAIN
Vladimír Čunát [Fri, 12 Jan 2018 15:15:08 +0000 (16:15 +0100)]
validator: fix NSEC* -> NODATA
Petr Špaček [Mon, 22 Jan 2018 09:25:46 +0000 (10:25 +0100)]
Merge branch 'misc-fix' into 'master'
daemon/worker: worker_process_tcp: cleanup
See merge request knot/knot-resolver!452
Grigorii Demidov [Mon, 22 Jan 2018 09:16:42 +0000 (10:16 +0100)]
daemon/worker: worker_process_tcp: cleanup; there are no need in special processing for qr_task_step return code
Vladimír Čunát [Fri, 19 Jan 2018 16:10:32 +0000 (17:10 +0100)]
cache: fix answers from wildcards
Also make the control flow more readable and tweak comments.
Vladimír Čunát [Fri, 19 Jan 2018 12:08:31 +0000 (13:08 +0100)]
cache: fix CNAME on DS query
Petr Špaček [Fri, 19 Jan 2018 10:07:50 +0000 (11:07 +0100)]
Merge branch 'cdn-mozilla' into 'master'
layer/iterate: forwarding; repeat query to upstream if SERVFAIL\REFUSE has been received
See merge request knot/knot-resolver!451
Grigorii Demidov [Wed, 17 Jan 2018 12:50:23 +0000 (13:50 +0100)]
layer/iterate: forwarding; repeat query to upstream if SERVFAIL\REFUSE has been received
Petr Špaček [Fri, 19 Jan 2018 09:18:44 +0000 (10:18 +0100)]
Merge branch 'dockerfile-add-flake8' into 'master'
ci: add flake8 to Dockerfile
See merge request knot/knot-resolver!449
Tomas Krizek [Thu, 18 Jan 2018 16:16:58 +0000 (17:16 +0100)]
ci: docker - add flake8, remove infer
We do not use Infer after all (see MR !435) so it does not make sense to
have it in the image.
Petr Špaček [Fri, 19 Jan 2018 09:03:48 +0000 (10:03 +0100)]
Merge branch 'assert-cleanup' into 'master'
daemon/worker: clean up some unnecessary asserts
See merge request knot/knot-resolver!450
Grigorii Demidov [Fri, 19 Jan 2018 08:26:00 +0000 (09:26 +0100)]
daemon/worker: clean up some unnecessary asserts
Vladimír Čunát [Thu, 18 Jan 2018 17:15:00 +0000 (18:15 +0100)]
cache: assertion nitpicks
Vladimír Čunát [Thu, 18 Jan 2018 17:11:44 +0000 (18:11 +0100)]
fixup! treewide: safer structure literals and initialization
Vladimír Čunát [Thu, 18 Jan 2018 16:55:12 +0000 (17:55 +0100)]
TMP Merge branch 'valid-nxdomain' into cache-aggr-wip
Petr Špaček [Thu, 18 Jan 2018 15:40:12 +0000 (16:40 +0100)]
Merge branch 'tls_polish' into 'master'
TLS polish
See merge request knot/knot-resolver!447
Vladimír Čunát [Thu, 18 Jan 2018 15:30:52 +0000 (16:30 +0100)]
Merge branch 'master' into valid-nxdomain
Conflicts: lib/dnssec/nsec3.c
Petr Špaček [Thu, 18 Jan 2018 15:22:56 +0000 (16:22 +0100)]
TLS: make GnuTLS priorities compatible with CentOS 7 and Debian 9
gnutls-3.3.26-9.el7.x86_64 and libgnutls30-3.5.8-5+deb9u3 do not support
@SYSTEM keyword and CentOS 7 has problem with -VERS-DTLS-ALL.
We do not configure DTLS sockets so it should be harmless to delete
the DTLS keyword.
@SYSTEM is replaced by NORMAL, oh well.
fixup! TLS client: enforce minimal TLS version and no compression
Petr Špaček [Thu, 18 Jan 2018 14:47:15 +0000 (15:47 +0100)]
TLS client: enforce minimal TLS version and no compression
Same change as in
a625a0ea1ce03b0707fd421633f21c0aacb786da but for
client.
Petr Špaček [Thu, 18 Jan 2018 13:12:45 +0000 (14:12 +0100)]
TLS server: enforce minimal TLS version and no compression
Server side now enforces security requirements from
draft-ietf-dprive-dtls-and-tls-profiles-11 section 9
Petr Špaček [Thu, 18 Jan 2018 13:11:26 +0000 (14:11 +0100)]
TLS: use constants for GnuTLS return codes
GnuTLS manual for some functions do not declare that error return code
must be negative, so we should use constants to avoid potential
problems.
Petr Špaček [Thu, 18 Jan 2018 13:11:16 +0000 (14:11 +0100)]
TLS client: fix certificate loading from file
gnutls_certificate_set_x509_trust_file could theoretically return 0
to indicate nothing was read, so we need to check for this as well.
Vladimír Čunát [Thu, 18 Jan 2018 15:24:13 +0000 (16:24 +0100)]
Merge !448: daemon: tls forwarding; fix IO error processing
Grigorii Demidov [Thu, 18 Jan 2018 14:37:30 +0000 (15:37 +0100)]
daemon: tls forwarding; fix erroneus task processing when io errors occur
Tomas Krizek [Thu, 18 Jan 2018 14:08:29 +0000 (15:08 +0100)]
Merge branch 'tmpfiles-create-cache' into 'master'
tmpfiles: create cache and use proper tmpfiles name
See merge request knot/knot-resolver!440
Tomas Krizek [Fri, 12 Jan 2018 09:32:42 +0000 (10:32 +0100)]
tmpfiles: create cache and use proper tmpfiles name
Petr Špaček [Thu, 18 Jan 2018 12:48:06 +0000 (13:48 +0100)]
Merge branch 'tls_tests' into 'master'
policy TLS_FORWARD: add checks and documentation
See merge request knot/knot-resolver!445
Petr Špaček [Thu, 18 Jan 2018 12:39:24 +0000 (13:39 +0100)]
policy TLS_FORWARDING: rename pin to pin_sha256
The pin parameter contains SHA-256 encoded using Base64, but this is not
the only option. Explicit name allows us to add alternative formats
later on, and is consistent with GnuTLS naming.
Tomas Krizek [Thu, 18 Jan 2018 11:19:55 +0000 (12:19 +0100)]
policy TLS_FORWARD: documentation improvements
Petr Špaček [Wed, 17 Jan 2018 18:08:53 +0000 (19:08 +0100)]
policy TLS_FORWARD: add documentation
Petr Špaček [Wed, 17 Jan 2018 13:58:57 +0000 (14:58 +0100)]
policy TLS_FORWARD: unify logging format
Petr Špaček [Wed, 17 Jan 2018 13:37:16 +0000 (14:37 +0100)]
policy TLS_FORWARD: fix error reporting from net.tls_client()
Petr Špaček [Fri, 12 Jan 2018 15:57:03 +0000 (16:57 +0100)]
policy TLS_FORWARD: check parameters from user
Policy handling was split into smaller functions to allow easier
checking. The code needs further refactoring, it seems that
net_tls_client is just a thin wrapper around tls_client_params_set in C,
which is unnecessary and error prone.
Petr Špaček [Fri, 12 Jan 2018 13:59:59 +0000 (14:59 +0100)]
policy TLS_FORWARD: improve error reporting for invalid parameters
Petr Špaček [Fri, 12 Jan 2018 13:37:51 +0000 (14:37 +0100)]
tests: add config tests for TLS_FORWARD
Apparently some corner cases are not handled properly.
We need to fix these in follow-up patches.
Vladimír Čunát [Thu, 18 Jan 2018 11:50:33 +0000 (12:50 +0100)]
cache pkt: relax an assertion
I _think_ (pkt->parsed != pkt->size) didn't catch all KNOT_EMALF cases.
Petr Špaček [Thu, 18 Jan 2018 11:28:27 +0000 (12:28 +0100)]
Merge branch 'cleanup-errors' into 'master'
fix some errors found by static analyzer
See merge request knot/knot-resolver!446
Petr Špaček [Thu, 18 Jan 2018 09:43:54 +0000 (10:43 +0100)]
CI: tweak scan-build configuration
Clang right now does not support cleanup attribute which is causing
false positives, so the check is now disabled.
https://bugs.llvm.org/show_bug.cgi?id=3888
At the same time I've enabled all other checkers to see what happens. We
need to go though them and disable them one-by-one if necessary.
Vladimír Čunát [Thu, 18 Jan 2018 09:49:56 +0000 (10:49 +0100)]
treewide: safer structure literals and initialization
Based on C99 this was OK, see 6.7.8.19, 6.5.2.5.6 and 6.7.8.10.
Still, e.g. gcc 5.4 and 6.2 were mis-compiling some cases of this under
certain conditions (-O0), causing hard-to-track bugs. I've been unable
to find a problem in 5.5, 6.4 and 7.2 or older clang, but let's be on
the safer side nevertheless.
Marek Vavruša [Thu, 18 Jan 2018 00:55:52 +0000 (16:55 -0800)]
daemon/main: refactored keyfile initialization from main()
this helps avoid false positive leaks caused by combination of
cleanup functions and goto
refs #291
Marek Vavruša [Thu, 18 Jan 2018 00:57:49 +0000 (16:57 -0800)]
lib/dnssec: variable declaration close to intended to avoid dead stores
Marek Vavruša [Thu, 18 Jan 2018 00:57:00 +0000 (16:57 -0800)]
daemon/worker: fixed missing return value check
Marek Vavruša [Thu, 18 Jan 2018 00:54:55 +0000 (16:54 -0800)]
daemon/engine: fixed missing ret
Marek Vavruša [Thu, 18 Jan 2018 00:39:37 +0000 (16:39 -0800)]
daemon: fixed potential leak - cleanup not being called on longjmp
attribute cleanup (auto_free) gets called when variable goes out of
scope, not on longjmp (in lua_error), so the variable never gets freed
Petr Špaček [Wed, 17 Jan 2018 16:08:49 +0000 (17:08 +0100)]
Merge branch 'dockerfile-add-static-analysis-tools' into 'master'
Dockerfile: add static analysis tools
See merge request knot/knot-resolver!444
Vladimír Čunát [Wed, 17 Jan 2018 15:08:14 +0000 (16:08 +0100)]
cache entry_rr: fix two simple lint warnings
The first might have lead to a segfault
(not sure ATM, depends on callers).
Vladimír Čunát [Wed, 17 Jan 2018 14:51:16 +0000 (15:51 +0100)]
fix two trivial lint warnings
Vladimír Čunát [Wed, 17 Jan 2018 14:47:23 +0000 (15:47 +0100)]
utils knot_dname_lf2wire: fix a lint warning
Vladimír Čunát [Wed, 17 Jan 2018 13:55:45 +0000 (14:55 +0100)]
cache: another debugging check
Tomas Krizek [Tue, 16 Jan 2018 16:25:51 +0000 (17:25 +0100)]
Dockerfile: add static analysis tools
Vladimír Čunát [Tue, 16 Jan 2018 18:38:28 +0000 (19:38 +0100)]
WIP: fixing counterparts of the validator problems
TODO: re-check, do tests, etc.
Vladimír Čunát [Tue, 16 Jan 2018 14:13:13 +0000 (15:13 +0100)]
TMP Merge branch 'valid-nxdomain' into cache-aggr-wip
Vladimír Čunát [Mon, 15 Jan 2018 17:08:47 +0000 (18:08 +0100)]
validator nitpick: remove a useless dead store
Discovered by clang scan.
Vladimír Čunát [Fri, 5 Jan 2018 09:15:43 +0000 (10:15 +0100)]
validator: fix NSEC* + delegation -> NXDOMAIN
Vladimír Čunát [Fri, 12 Jan 2018 15:15:08 +0000 (16:15 +0100)]
validator: fix NSEC* -> NODATA
Vladimír Čunát [Mon, 15 Jan 2018 15:54:16 +0000 (16:54 +0100)]
cache: basic preparation for stale-serving
Petr Špaček [Fri, 12 Jan 2018 13:36:04 +0000 (14:36 +0100)]
Merge branch 'tls-hs-timeout' into 'master'
daemon: TLS-handshake timeout timer was not properly activated; fix
See merge request knot/knot-resolver!441
Grigorii Demidov [Fri, 12 Jan 2018 12:54:37 +0000 (13:54 +0100)]
daemon: TLS-handshake timeout timer was not properly activated; fix
Petr Špaček [Fri, 12 Jan 2018 10:24:22 +0000 (11:24 +0100)]
Merge branch 'stricter-ci-build' into 'master'
ci: add -Werror to CFLAGS, added clang build target
See merge request knot/knot-resolver!432
Marek Vavruša [Fri, 12 Jan 2018 07:11:08 +0000 (23:11 -0800)]
lint: enabled several readability linters and fixed issues
this checks things such as inconsistent declarations and definitions
Marek Vavruša [Fri, 12 Jan 2018 06:37:20 +0000 (22:37 -0800)]
daemon: fixed garbage read when getsockname fails
Marek Vavruša [Fri, 12 Jan 2018 06:29:24 +0000 (22:29 -0800)]
lib: fixed possible null pointers passed to nonnull arguments
Marek Vavruša [Fri, 12 Jan 2018 06:15:16 +0000 (22:15 -0800)]
daemon: fixed minor linter problems
Marek Vavruša [Fri, 12 Jan 2018 06:16:01 +0000 (22:16 -0800)]
client: fixed minor linter problems
Marek Vavruša [Fri, 12 Jan 2018 06:07:30 +0000 (22:07 -0800)]
lib: fixed minor linter issues in lib
Marek Vavruša [Fri, 12 Jan 2018 06:01:34 +0000 (22:01 -0800)]
lib/defines: analyzable implementation for kr_error()
Marek Vavruša [Thu, 11 Jan 2018 01:09:04 +0000 (17:09 -0800)]
build: support `make lint-c` with clang-tidy
This supports linting of C code using clang-tidy to fix common
security and code quality issues early in the development workflow.
The benefit is that less time has to be spent in code reviews to
point out obvious problems, and ideally when the outstanding issues
are fixed, clang-tidy (and clang-format) can also be used to to
automatically fix basic problems and enforce common code style,
similarly to `go vet && go fmt` workflow.
Marek Vavruša [Tue, 9 Jan 2018 17:38:10 +0000 (09:38 -0800)]
ci: add -Werror to CFLAGS, added clang build target
Petr Špaček [Thu, 11 Jan 2018 18:39:48 +0000 (19:39 +0100)]
Merge branch 'clang' into 'master'
fixup! CI: add Clang scan-build to the pipeline
See merge request knot/knot-resolver!438
Petr Špaček [Thu, 11 Jan 2018 18:31:34 +0000 (19:31 +0100)]
fixup! CI: add Clang scan-build to the pipeline
Forgot to `git add` Dockerfile with Clang tools.
Petr Špaček [Thu, 11 Jan 2018 18:26:58 +0000 (19:26 +0100)]
Merge branch 'systemd-modifications' into 'master'
Systemd modifications
See merge request knot/knot-resolver!436
Tomas Krizek [Thu, 11 Jan 2018 15:13:01 +0000 (16:13 +0100)]
systemd: add knot-resolver alias
The `knot-resolver` name is used for paths and user name. Creating a
systemd alias with the same name is user-friendly to end users who won't
have to remember another name (`kresd`).
Note: Systemd Alias is only created after service is enabled. Packagers
are thus advised to create symlinks for unit files during package installation
so users can use `knot-resolver` name right from the start.
Tomas Krizek [Thu, 11 Jan 2018 12:50:52 +0000 (13:50 +0100)]
systemd: use persistent cache by default
The /run directory is non-persistent. Use /var/cache/knot-resolver
as a persistent cache.
Tomas Krizek [Thu, 11 Jan 2018 12:55:08 +0000 (13:55 +0100)]
README: remove trailing whitespace
Petr Špaček [Thu, 11 Jan 2018 17:48:53 +0000 (18:48 +0100)]
Merge branch 'clan-scan-build' into 'master'
CI: add Clan scan build to pipeline
See merge request knot/knot-resolver!437
Petr Špaček [Thu, 11 Jan 2018 17:12:30 +0000 (18:12 +0100)]
CI: add Clang scan-build to the pipeline
For now error produced by scan-build are not fatal.
We need to fix these first.
Petr Špaček [Thu, 11 Jan 2018 17:12:06 +0000 (18:12 +0100)]
CI: use images from local registry
Petr Špaček [Thu, 11 Jan 2018 07:07:21 +0000 (08:07 +0100)]
Merge branch 'fix-systemd-service' into 'master'
systemd: drop WantedBy directive from kresd.service
See merge request knot/knot-resolver!433
Daniel Kahn Gillmor [Tue, 9 Jan 2018 21:06:45 +0000 (16:06 -0500)]
systemd: drop WantedBy directive from kresd.service
This directive is unnecessary in the .service file, and it also causes
a dependency cycle that systemd is obliged to break.
Since kresd is socket-activated, there is no need for the WantedBy
directive in the .service file itself. As long as the .socket files
are installed, the service will run when it is used.
Vladimír Čunát [Wed, 10 Jan 2018 15:09:16 +0000 (16:09 +0100)]
cache: nitpicks and comments
Petr Špaček [Wed, 10 Jan 2018 14:46:26 +0000 (15:46 +0100)]
Merge branch 'systemd-enable-manual-activation' into 'master'
systemd: enable manual activation of kresd.service as non-root user
See merge request knot/knot-resolver!434
Tomas Krizek [Wed, 10 Jan 2018 13:05:53 +0000 (14:05 +0100)]
systemd: enable manual activation of kresd.service as non-root user
To be able to bind to a well known port as a non-root user, the CAP_NET_BIND_SERVICE
capability is required.
Vladimír Čunát [Tue, 9 Jan 2018 09:54:20 +0000 (10:54 +0100)]
Merge !431: daemon: fix clang warnings
Grigorii Demidov [Tue, 9 Jan 2018 09:35:26 +0000 (10:35 +0100)]
daemon: fix clang warnings
Vladimír Čunát [Mon, 8 Jan 2018 14:34:19 +0000 (15:34 +0100)]
cache get_lowest_rank: cleaner code
Petr Špaček [Mon, 8 Jan 2018 11:40:07 +0000 (12:40 +0100)]
Merge branch 'sim_qry' into 'master'
outbound TCP connections sharing; TLS over outbound TCP connections
Closes #104
See merge request knot/knot-resolver!379
Grigorii Demidov [Mon, 8 Jan 2018 09:12:17 +0000 (10:12 +0100)]
daemon: avoid memory leaks under heavy load when using tls over outgoing tcp connection
Grigorii Demidov [Fri, 5 Jan 2018 09:03:23 +0000 (10:03 +0100)]
daemon: kresd fall into endless loop in some circumstances when tls is used; fix
Grigorii Demidov [Fri, 5 Jan 2018 07:15:39 +0000 (08:15 +0100)]
daemon/tls_ephemeral_credentials: avoid some memory leaks
grid [Wed, 3 Jan 2018 10:39:03 +0000 (11:39 +0100)]
daemon: explicit processing of UV_EOF within stream read callback function
Vladimír Čunát [Thu, 14 Dec 2017 12:24:35 +0000 (13:24 +0100)]
TLS: only print [tls] messages if --verbose
Petr Špaček [Wed, 13 Dec 2017 16:05:33 +0000 (17:05 +0100)]
modules/policy: TLS defaults to port 853
grid [Wed, 13 Dec 2017 13:50:54 +0000 (14:50 +0100)]
modules/policy: local variable declarations were fixed; cleanup