]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
4 years agodoh2: replace references to obsolete DoH in docs, tests and example configs
Petr Špaček [Tue, 27 Oct 2020 11:30:19 +0000 (12:30 +0100)] 
doh2: replace references to obsolete DoH in docs, tests and example configs

4 years agoMerge branch '554-lua-command-map-does-not-work' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1204 obs-knot-dns-deve-jq0xxt/deployments/1206 obs-knot-resolver-es11k1/deployments/1205 obs-knot-resolver-es11k1/deployments/1207
Petr Špaček [Tue, 27 Oct 2020 10:45:01 +0000 (11:45 +0100)] 
Merge branch '554-lua-command-map-does-not-work' into 'master'

Reimplement map()

Closes #620 and #554

See merge request knot/knot-resolver!1000

4 years agotests: control socket test improvements
Petr Špaček [Mon, 26 Oct 2020 08:28:47 +0000 (09:28 +0100)] 
tests: control socket test improvements

4 years agotests: fixes for control socket tests
Petr Špaček [Mon, 26 Oct 2020 08:10:37 +0000 (09:10 +0100)] 
tests: fixes for control socket tests

Error handling inside the test was incorrent and a detected error would
blow up the test routine.

Related: !1011, 3f5a826d4cb859522d073503dcc40e5c59353511

4 years agoNEWS: cleanup incompatible changes
Tomas Krizek [Mon, 26 Oct 2020 14:18:06 +0000 (15:18 +0100)] 
NEWS: cleanup incompatible changes

4 years agographite: adapt to to changes in map()
Petr Špaček [Fri, 23 Oct 2020 16:07:59 +0000 (18:07 +0200)] 
graphite: adapt to to changes in map()

We don't have leader instance anymore, so each instance independently
provides Graphite statistics.

This commit also changes default Graphite prefix to solve problem
with conflicting instance names.

4 years agoworker: migrate worker.id to string
Petr Špaček [Fri, 23 Oct 2020 15:48:41 +0000 (17:48 +0200)] 
worker: migrate worker.id to string

It now contains either content of SYSTEMD_INSTANCE environment variable
or stringified version of getpid() value.

Main motivation is that the old worker.id was broken on systemd,
i.e. the default installation.

Related: #631

4 years agodoc: document new command buffering scheme
Petr Špaček [Fri, 23 Oct 2020 15:34:31 +0000 (17:34 +0200)] 
doc: document new command buffering scheme

Fixup for c0b5faf222dfa6e8db94838c18331e7147a37128.

4 years agohttp: adapt Prometheus to changes in map()
Petr Špaček [Fri, 23 Oct 2020 13:31:28 +0000 (15:31 +0200)] 
http: adapt Prometheus to changes in map()

We don't have leader instance anymore, so any instance can provide
Prometheus statistics.

For performance reasons an instance does not store past statistics
when no client is connected to HTTP socket. As a consequence chart in
web interface is empty when client loads the page and then gradually
chart fills up.

4 years agoprometheus: run on all instances
Petr Špaček [Fri, 23 Oct 2020 12:33:33 +0000 (14:33 +0200)] 
prometheus: run on all instances

4 years agomap: document internal use
Petr Špaček [Thu, 22 Oct 2020 11:15:50 +0000 (13:15 +0200)] 
map: document internal use

4 years agosystemd: control socket cleanup on exit
Petr Špaček [Thu, 22 Oct 2020 10:31:30 +0000 (12:31 +0200)] 
systemd: control socket cleanup on exit

Obviously this is is racy and cannot be relied upon.
Caller still has to handle connection errors.

4 years agokluautil.list_dir: make it portable to non-Linux
Vladimír Čunát [Thu, 22 Oct 2020 09:17:49 +0000 (11:17 +0200)] 
kluautil.list_dir: make it portable to non-Linux

4 years agogitignore: add missing files created by kresd when executed in worktree
Petr Špaček [Thu, 22 Oct 2020 07:10:28 +0000 (09:10 +0200)] 
gitignore: add missing files created by kresd when executed in worktree

New map() creates control/ sockets in current working directory so it
pollutes worktree when developers run it in worktree.

I've also added files with ephemeral certificates and pytests test report
which were missing as well.

4 years agomap: tests
Petr Špaček [Fri, 16 Oct 2020 11:50:11 +0000 (13:50 +0200)] 
map: tests

Three instances send commands and DNS queries to each other.

4 years agomap: disallow commands with \n
Petr Špaček [Tue, 20 Oct 2020 12:30:40 +0000 (14:30 +0200)] 
map: disallow commands with \n

Control protocol uses \n as command delimiter so we cannot allow \n
inside commands. Users should be able to Lua-escape \n with \010.

4 years agomap: prevent crash on unrepresentable responses
Petr Špaček [Tue, 20 Oct 2020 11:51:54 +0000 (13:51 +0200)] 
map: prevent crash on unrepresentable responses

Typical example of unrepresentable message is a Lua error.
E.g. error() called from kresc would lead to NULL message.

4 years agomap: thorough error checking on control socket operations
Petr Špaček [Tue, 20 Oct 2020 11:04:23 +0000 (13:04 +0200)] 
map: thorough error checking on control socket operations

4 years agotests: detect missing environment variable TEST_FILE
Petr Špaček [Fri, 16 Oct 2020 08:19:14 +0000 (10:19 +0200)] 
tests: detect missing environment variable TEST_FILE

4 years agokluautil: remove hard depedency on lua-cqueues
Petr Špaček [Fri, 16 Oct 2020 08:15:32 +0000 (10:15 +0200)] 
kluautil: remove hard depedency on lua-cqueues

For now we still attempt to support systems without lua-cqueues,
e.g. Ubuntu 16.04.

lua-http depends on lua-cqueues so the test for availability of lua-http
at the beginning of kr_https_fetch() should cover lua-cqueues as well.

4 years agotests: limit number of iterations for krprint.serialize_lua to please CI
Petr Špaček [Wed, 14 Oct 2020 16:05:23 +0000 (18:05 +0200)] 
tests: limit number of iterations for krprint.serialize_lua to please CI

We were exceeding CI time limit while running config tests under
Valgrind so let's see if smaller number of tests will get us through CI.

4 years agodaf: adapt to changes in map result handling
Petr Špaček [Wed, 14 Oct 2020 15:22:51 +0000 (17:22 +0200)] 
daf: adapt to changes in map result handling

4 years agomap: logging for weird responses
Petr Špaček [Wed, 14 Oct 2020 15:18:03 +0000 (17:18 +0200)] 
map: logging for weird responses

4 years agomap: rework result handling
Petr Špaček [Wed, 14 Oct 2020 09:08:43 +0000 (11:08 +0200)] 
map: rework result handling

map() command on leader instance now:
- detects call errors on followers
- detects unsupported number of return values
- detects unsupported data types which cannot be serialized
- keeps nil return values (signaled by table counter "n")

Fixes: #662
4 years agomap: input command validation
Petr Špaček [Wed, 14 Oct 2020 07:24:23 +0000 (09:24 +0200)] 
map: input command validation

Let's detect syntax errors before sending the command to all instances.

4 years agokluautil: table pack and unpack
Petr Špaček [Tue, 13 Oct 2020 15:53:37 +0000 (17:53 +0200)] 
kluautil: table pack and unpack

Helper functions for handling variable length arrays with nil values.

4 years agomap: stricter argument checking
Petr Špaček [Tue, 13 Oct 2020 15:05:59 +0000 (17:05 +0200)] 
map: stricter argument checking

4 years agotests: adapt config tests to new map()
Petr Špaček [Tue, 13 Oct 2020 10:54:16 +0000 (12:54 +0200)] 
tests: adapt config tests to new map()

map() now depends on presence of control sockets, and by default config
tests are executed with KRESD_NO_LISTEN=1 env var which prevents control
sockets from being created. Tests for features which depend on map() now
explicitly create their own control socket.

4 years agotests: improve process cleanup after config tests
Petr Špaček [Tue, 13 Oct 2020 10:53:07 +0000 (12:53 +0200)] 
tests: improve process cleanup after config tests

Previously exit trap executed command "kill -9" even if there were no
leftover processes and this lead to clutter in logs because kill
complained about missing arguments.

As a bonus the cleanup routine now prints information about leftover
processes.

4 years agodaemon: always listen on control socket, even in interactive mode
Petr Špaček [Tue, 21 Jul 2020 12:11:53 +0000 (14:11 +0200)] 
daemon: always listen on control socket, even in interactive mode

Reasons:
- It allows to run several kresd instances and use map() without
  worrying about instance parameters.
- It removes special case from map().

Proper functionality depends on changes in MR !1011.

4 years agokrprint.serialize_lua: rename function parameter to on_unpresentable
Petr Špaček [Mon, 20 Jul 2020 09:17:23 +0000 (11:17 +0200)] 
krprint.serialize_lua: rename function parameter to on_unpresentable

4 years agonew serialization method krprint.serialize_lua
Petr Špaček [Fri, 10 Jul 2020 12:32:25 +0000 (14:32 +0200)] 
new serialization method krprint.serialize_lua

Serializes: boolean, nil, number, string, table.
Skips all other types (functions, cdata, thread ...) and repeated
references to tables.

Resulting string should Lua-evaluate to identical objects.

4 years agomap: use control sockets instead of pipe from parent process
Lukáš Ježek [Mon, 27 Apr 2020 12:00:17 +0000 (14:00 +0200)] 
map: use control sockets instead of pipe from parent process

This change allows map() to work with systemd integration.

As a bonus the new client implementation is based on Lua cqueues
allows caller to wrap map() in worker.corroutine() and get
asynchronous execution/avoid blocking main loop.

Currently socket communication does not employ timeouts so a hang
instance will lead to hang map() call. This does not affect query
processing _if_ map() is being run in worker.corroutine.

Fixes: #554
Fixes: #620
4 years agoMerge branch '538-lower-default-edns-buffer-size-to-1232' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1194 obs-knot-dns-deve-jq0xxt/deployments/1196 obs-knot-dns-deve-jq0xxt/deployments/1198 obs-knot-dns-deve-jq0xxt/deployments/1201 obs-knot-dns-deve-jq0xxt/deployments/1202 obs-knot-resolver-es11k1/deployments/1195 obs-knot-resolver-es11k1/deployments/1197 obs-knot-resolver-es11k1/deployments/1199 obs-knot-resolver-es11k1/deployments/1200 obs-knot-resolver-es11k1/deployments/1203
Tomas Krizek [Fri, 23 Oct 2020 08:59:48 +0000 (10:59 +0200)] 
Merge branch '538-lower-default-edns-buffer-size-to-1232' into 'master'

daemon: lower EDNS buffer size to 1232

Closes #300 and #538

See merge request knot/knot-resolver!920

4 years agoci/respdiff: keep bufsize towards respdiff at 4K
Vladimír Čunát [Fri, 11 Sep 2020 15:39:37 +0000 (17:39 +0200)] 
ci/respdiff: keep bufsize towards respdiff at 4K

Note: this commits affects just the small respdiffs, not the big ones.

4 years agodocs: EDNS bufsize = 1232
Petr Špaček [Mon, 3 Feb 2020 14:11:15 +0000 (15:11 +0100)] 
docs: EDNS bufsize = 1232

4 years agodaemon: lower EDNS buffer size to 1232
Lukáš Ježek [Fri, 10 Jan 2020 06:17:06 +0000 (07:17 +0100)] 
daemon: lower EDNS buffer size to 1232

4 years agoMerge branch 'forward-cname-sibling' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1190 obs-knot-dns-deve-jq0xxt/deployments/1193 obs-knot-resolver-es11k1/deployments/1189 obs-knot-resolver-es11k1/deployments/1192
Petr Špaček [Wed, 21 Oct 2020 20:31:16 +0000 (22:31 +0200)] 
Merge branch 'forward-cname-sibling' into 'master'

fix SERVFAIL in *FORWARD modes with certain CNAME setup

Closes #614

See merge request knot/knot-resolver!1070

4 years agofix SERVFAIL in *FORWARD modes with CNAME to sibling zone
Vladimír Čunát [Mon, 5 Oct 2020 08:35:16 +0000 (10:35 +0200)] 
fix SERVFAIL in *FORWARD modes with CNAME to sibling zone

It failed on a CNAME to a sibling name that's a zone cut.
Fixed by a minimalistic approach - tweaking the conditions
to always ask each CNAME step separately when forwarding.

4 years agoMerge !985: change API for reply packet buffers
Vladimír Čunát [Wed, 21 Oct 2020 11:20:49 +0000 (13:20 +0200)] 
Merge !985: change API for reply packet buffers

4 years agolib/resolve kr_request_ensure_answer(): allow it to fail 70860
Vladimír Čunát [Fri, 25 Sep 2020 15:59:57 +0000 (17:59 +0200)] 
lib/resolve kr_request_ensure_answer(): allow it to fail

For now I was too afraid to use "multi-flag" kr_request::state,
so I kept it at _FAIL; anyone can recognize it by NULL answer anyway.

Lua wrapper: using exception was considered but didn't seem good.
I utilized the fact that modules can return nil meaning no state change.

4 years agolib/resolve answer_finalize: fix AD flag handling
Vladimír Čunát [Fri, 13 Sep 2019 17:18:55 +0000 (19:18 +0200)] 
lib/resolve answer_finalize: fix AD flag handling

Resolves a FIXME, and this way of doing AD should be better/safer.
(Lower likelihood of accidentally leaving it on in some situation.)

GC test: the record is inserted manually with _SECURE rank but without
signatures.  I think it's better to return AD flag in that edge case.

4 years agoWIP delay allocation of kr_request::answer
Vladimír Čunát [Fri, 13 Sep 2019 16:26:19 +0000 (18:26 +0200)] 
WIP delay allocation of kr_request::answer

FIXME: see FIXMEs in diff, document the API change, re-review.

4 years agoiterate nitpick: drop unused function parameter
Vladimír Čunát [Fri, 13 Sep 2019 16:14:54 +0000 (18:14 +0200)] 
iterate nitpick: drop unused function parameter

4 years agolib/resolve creation of first query: fix a rare possible bug
Vladimír Čunát [Wed, 11 Sep 2019 15:57:41 +0000 (17:57 +0200)] 
lib/resolve creation of first query: fix a rare possible bug

qname here wasn't lower-cased, so the match might not be correct.
Still, practically all deployments use either root TA or none,
and these can't be affected.

4 years agocompatible changes around kr_request::answer
Vladimír Čunát [Wed, 11 Sep 2019 15:22:59 +0000 (17:22 +0200)] 
compatible changes around kr_request::answer

4 years agoMerge branch 'meson-0.49' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1187 obs-knot-resolver-es11k1/deployments/1188
Tomas Krizek [Tue, 20 Oct 2020 13:58:35 +0000 (15:58 +0200)] 
Merge branch 'meson-0.49' into 'master'

meson: update to version 0.49

See merge request knot/knot-resolver!1082

4 years agomeson: update to version 0.49 obs-knot-resolver-bs4hbr/deployments/1186
Tomas Krizek [Fri, 16 Oct 2020 08:49:39 +0000 (10:49 +0200)] 
meson: update to version 0.49

4 years agoMerge branch 'unify-ENABLE-defines' into 'master'
Tomas Krizek [Tue, 20 Oct 2020 09:11:51 +0000 (11:11 +0200)] 
Merge branch 'unify-ENABLE-defines' into 'master'

treewide: unify ENABLE_* defines

See merge request knot/knot-resolver!1084

4 years agotreewide: unify ENABLE_* defines
Vladimír Čunát [Mon, 19 Oct 2020 14:24:09 +0000 (16:24 +0200)] 
treewide: unify ENABLE_* defines

Two styles were used: (un)defined and 0/1.  We switch to 0/1.
Advantage: it can be used also like `if (ENABLE_FOO)`
(outside preprocessor).

Except for ./meson.build it's sed \
 -e 's/#ifdef ENABLE_CAP_NG/#if ENABLE_CAP_NG/g' \
 -e 's/#ifdef ENABLE_DOH2/#if ENABLE_DOH2/g' \
 -e 's/defined(ENABLE_COOKIES)/ENABLE_COOKIES/g' \
 -e 's/#ifdef ENABLE_COOKIES/#if ENABLE_COOKIES/g' \
 -i $(git grep -l ENABLE_)

4 years agoMerge branch 'ci-knot-xdp' into 'master'
Tomas Krizek [Tue, 20 Oct 2020 09:02:46 +0000 (11:02 +0200)] 
Merge branch 'ci-knot-xdp' into 'master'

ci: use docker image with XDP support

See merge request knot/knot-resolver!1085

4 years agoci: use docker image with XDP support
Vladimír Čunát [Tue, 20 Oct 2020 08:55:06 +0000 (10:55 +0200)] 
ci: use docker image with XDP support

4 years agoMerge !1079: doc: generate Info manual obs-knot-dns-deve-jq0xxt/deployments/1178 obs-knot-dns-deve-jq0xxt/deployments/1180 obs-knot-dns-deve-jq0xxt/deployments/1182 obs-knot-dns-deve-jq0xxt/deployments/1184 obs-knot-resolver-es11k1/deployments/1177 obs-knot-resolver-es11k1/deployments/1179 obs-knot-resolver-es11k1/deployments/1181 obs-knot-resolver-es11k1/deployments/1185
Vladimír Čunát [Fri, 16 Oct 2020 08:04:46 +0000 (10:04 +0200)] 
Merge !1079: doc: generate Info manual

4 years agodoc/info: package figures obs-knot-resolver-bs4hbr/deployments/1173
Tomas Krizek [Thu, 15 Oct 2020 08:48:09 +0000 (10:48 +0200)] 
doc/info: package figures

4 years agodoc/info: create and install figures
Simon South [Thu, 15 Oct 2020 11:13:20 +0000 (07:13 -0400)] 
doc/info: create and install figures

4 years agodoc/meson: fix installation with missing info page
Tomas Krizek [Wed, 14 Oct 2020 10:22:53 +0000 (12:22 +0200)] 
doc/meson: fix installation with missing info page

4 years agodistro/*: package info files
Tomas Krizek [Tue, 13 Oct 2020 09:29:31 +0000 (11:29 +0200)] 
distro/*: package info files

4 years agodoc: use non-format-specific references to documentation
Simon South [Tue, 13 Oct 2020 00:14:43 +0000 (20:14 -0400)] 
doc: use non-format-specific references to documentation

The "build-html-doc" ref-ID is preserved so as to not risk breaking
Web links and similar.

4 years agodoc: generate Info manual
Simon South [Tue, 13 Oct 2020 00:14:42 +0000 (20:14 -0400)] 
doc: generate Info manual

Check for makeinfo during configuration and if found, generate and
install documentation in Info format.

4 years agoMerge branch '251-warn-if-static-unmanaged-key-is-used' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1175 obs-knot-resolver-es11k1/deployments/1174
Tomas Krizek [Thu, 15 Oct 2020 11:17:08 +0000 (13:17 +0200)] 
Merge branch '251-warn-if-static-unmanaged-key-is-used' into 'master'

Resolve "warn if static (unmanaged) key is used"

Closes #251

See merge request knot/knot-resolver!1051

4 years agomodules/ta_update: improve warning message
Lukáš Ježek [Tue, 13 Oct 2020 09:13:00 +0000 (11:13 +0200)] 
modules/ta_update: improve warning message

4 years agomodules/ta_update nitpick: don't call os.time() again
Vladimír Čunát [Thu, 13 Aug 2020 11:42:40 +0000 (13:42 +0200)] 
modules/ta_update nitpick: don't call os.time() again

4 years agotests: replace the deprecated -f parameter
Vladimír Čunát [Mon, 5 Oct 2020 17:44:16 +0000 (19:44 +0200)] 
tests: replace the deprecated -f parameter

4 years agomodules/ta_update: warn if there are differences between statically configured keys...
Lukáš Ježek [Tue, 25 Aug 2020 10:03:10 +0000 (12:03 +0200)] 
modules/ta_update: warn if there are differences between statically configured keys and upstream

4 years agota_update: rfc5011 test: fix knotd startup
Lukáš Ježek [Fri, 14 Aug 2020 09:50:05 +0000 (11:50 +0200)] 
ta_update: rfc5011 test: fix knotd startup

4 years agota_update: rfc5011 test: removing the missing -r parameter for dnssec-tools
Lukáš Ježek [Fri, 14 Aug 2020 09:28:40 +0000 (11:28 +0200)] 
ta_update: rfc5011 test: removing the missing -r parameter for dnssec-tools

4 years agoMerge branch 'doh-module-c' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1164 obs-knot-dns-deve-jq0xxt/deployments/1168 obs-knot-resolver-es11k1/deployments/1165 obs-knot-resolver-es11k1/deployments/1169
Lukas Jezek [Tue, 13 Oct 2020 12:23:06 +0000 (14:23 +0200)] 
Merge branch 'doh-module-c' into 'master'

doh2: C implementation of DoH using nghttp2

Closes #600

See merge request knot/knot-resolver!997

4 years agodaemon/http: fix double-free on some pkt send failures
Tomas Krizek [Wed, 7 Oct 2020 13:14:09 +0000 (15:14 +0200)] 
daemon/http: fix double-free on some pkt send failures

When http_write() returns non-zero, worker_submit() performs the task
cleanup and calling on_write() callback only causes double free.

4 years agodoc: update doh/doh2 documentation
Tomas Krizek [Thu, 27 Aug 2020 13:01:00 +0000 (15:01 +0200)] 
doc: update doh/doh2 documentation

4 years agodistro/*: update module-http packaging description
Tomas Krizek [Mon, 5 Oct 2020 14:15:21 +0000 (16:15 +0200)] 
distro/*: update module-http packaging description

4 years agodaemon: add deprecation warning for old DoH implementation
Tomas Krizek [Fri, 2 Oct 2020 11:31:25 +0000 (13:31 +0200)] 
daemon: add deprecation warning for old DoH implementation

4 years agodaemon/http: document unsupported interleaving DATA
Tomas Krizek [Fri, 2 Oct 2020 10:31:32 +0000 (12:31 +0200)] 
daemon/http: document unsupported interleaving DATA

4 years agodaemon/http: replace strchrnul for mac os compatibility
Tomas Krizek [Fri, 2 Oct 2020 08:43:15 +0000 (10:43 +0200)] 
daemon/http: replace strchrnul for mac os compatibility

strchrnul() is a GNU extension that is not available on Mac OS.

4 years agodaemon/http: log connection errors to verbose
Tomas Krizek [Fri, 2 Oct 2020 08:16:30 +0000 (10:16 +0200)] 
daemon/http: log connection errors to verbose

4 years agoluacheck: comment out unused code and variables
Tomas Krizek [Fri, 2 Oct 2020 08:07:07 +0000 (10:07 +0200)] 
luacheck: comment out unused code and variables

4 years agotests/config: doh2 - use tabs for indentation
Tomas Krizek [Fri, 2 Oct 2020 08:02:17 +0000 (10:02 +0200)] 
tests/config: doh2 - use tabs for indentation

4 years agotests/config: modify doh tests for doh2
Tomas Krizek [Thu, 1 Oct 2020 15:07:23 +0000 (17:07 +0200)] 
tests/config: modify doh tests for doh2

Test only supported test-cases. Extend list of lua dependencies
for config tests.

4 years agotests/config: import tests from lua-http doh
Tomas Krizek [Thu, 1 Oct 2020 12:32:59 +0000 (14:32 +0200)] 
tests/config: import tests from lua-http doh

4 years agodaemon/http: make sure uv_handle is always initialized
Tomas Krizek [Thu, 1 Oct 2020 12:09:47 +0000 (14:09 +0200)] 
daemon/http: make sure uv_handle is always initialized

It is later closed in endpoint_close(), which would fail with assert if
not initialized (e.g. when compiled without nghttp2 support and
attempting to use doh2 kind).

4 years agodaemon: make nghttp2 optional
Tomas Krizek [Wed, 30 Sep 2020 12:10:23 +0000 (14:10 +0200)] 
daemon: make nghttp2 optional

4 years agodaemon/http: remove plain HTTP implementation artifacts
Tomas Krizek [Wed, 30 Sep 2020 12:09:32 +0000 (14:09 +0200)] 
daemon/http: remove plain HTTP implementation artifacts

4 years agocontrib/base64: sync with Knot DNS
Tomas Krizek [Fri, 25 Sep 2020 13:35:20 +0000 (15:35 +0200)] 
contrib/base64: sync with Knot DNS

4 years agodistro/tests: test_doh2 run curl test only when needed
Tomas Krizek [Fri, 25 Sep 2020 11:05:34 +0000 (13:05 +0200)] 
distro/tests: test_doh2 run curl test only when needed

4 years agodistro/tests: add tests for new DoH implementation
Jakub Ružička [Fri, 11 Sep 2020 17:33:20 +0000 (19:33 +0200)] 
distro/tests: add tests for new DoH implementation

* one test unsing curl and sha256sum (get_url can't do HTTP/2)
* one test using kdig when correct version is present

4 years agodistro: add new dependency: libnghttp2
Jakub Ružička [Wed, 9 Sep 2020 15:03:00 +0000 (17:03 +0200)] 
distro: add new dependency: libnghttp2

This is needed by new DoH implementation.

4 years agodaemon/io: use MANDATORY_APLN only with new gnutls
Tomas Krizek [Fri, 25 Sep 2020 08:58:08 +0000 (10:58 +0200)] 
daemon/io: use MANDATORY_APLN only with new gnutls

This is only needed to fail early during the handshake, if protocol
negotiation doesn't succeed. With older GnuTLS, if there's a protocol
mismatch, the data won't be understood and the connection will close
later on.

Mandatory ALPN doesn't affect clients that don't use the ALPN extension.

4 years agodaemon/bindings: assign doh2 kind in net.list()
Tomas Krizek [Fri, 11 Sep 2020 10:15:32 +0000 (12:15 +0200)] 
daemon/bindings: assign doh2 kind in net.list()

4 years agoDockerfile: add nghttp2 dependency
Tomas Krizek [Wed, 9 Sep 2020 09:56:14 +0000 (11:56 +0200)] 
Dockerfile: add nghttp2 dependency

4 years agodaemon/http: make lint happy
Tomas Krizek [Wed, 9 Sep 2020 09:34:13 +0000 (11:34 +0200)] 
daemon/http: make lint happy

4 years agodaemon/worker: simplify condition
Tomas Krizek [Tue, 8 Sep 2020 08:53:57 +0000 (10:53 +0200)] 
daemon/worker: simplify condition

4 years agodaemon: decrease write errors severity in log
Tomas Krizek [Wed, 2 Sep 2020 12:32:21 +0000 (14:32 +0200)] 
daemon: decrease write errors severity in log

4 years agodaemon/worker: expose number of write errors
Tomas Krizek [Wed, 2 Sep 2020 12:31:22 +0000 (14:31 +0200)] 
daemon/worker: expose number of write errors

4 years agodaemon/http: improve handling of incomplete streams
Tomas Krizek [Wed, 26 Aug 2020 10:14:48 +0000 (12:14 +0200)] 
daemon/http: improve handling of incomplete streams

4 years agodaemon/worker: ensure ignored queries pop from http stream id queue
Tomas Krizek [Tue, 25 Aug 2020 14:44:14 +0000 (16:44 +0200)] 
daemon/worker: ensure ignored queries pop from http stream id queue

4 years agodaemon/lua: update kres-gen.lua
Tomas Krizek [Mon, 24 Aug 2020 09:42:28 +0000 (11:42 +0200)] 
daemon/lua: update kres-gen.lua

4 years agodaemon/http: ensure on_write is called on failures
Tomas Krizek [Thu, 20 Aug 2020 15:17:52 +0000 (17:17 +0200)] 
daemon/http: ensure on_write is called on failures

4 years agodaemon/http: immediately set handle to write_req in http_write()
Tomas Krizek [Thu, 20 Aug 2020 14:13:43 +0000 (16:13 +0200)] 
daemon/http: immediately set handle to write_req in http_write()

This seems to be safe to do, since libuv handles tcp write in
a very similar way.

4 years agodaemon/http: document header_callback
Tomas Krizek [Thu, 20 Aug 2020 14:13:35 +0000 (16:13 +0200)] 
daemon/http: document header_callback

4 years agodaemon/http: polish send_padding
Tomas Krizek [Thu, 20 Aug 2020 14:13:12 +0000 (16:13 +0200)] 
daemon/http: polish send_padding

4 years agodaemon/http: write correct packet buffer
Tomas Krizek [Thu, 20 Aug 2020 13:03:05 +0000 (15:03 +0200)] 
daemon/http: write correct packet buffer

task->pktbuf isn't the same as the passed in pkt in qr_task_send().
pkt must be used and it must also stay valid as long as the task
lives. This seems to be the case for request answers, as they aren't
freed until there are no more tasks that reference them.