]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
3 years agoRevert "ci/pkgtest: switch bad LXC builds to manual start"
Vladimír Čunát [Tue, 26 Jul 2022 16:40:29 +0000 (18:40 +0200)] 
Revert "ci/pkgtest: switch bad LXC builds to manual start"

This reverts commit ac3e7ac72cc347e01660d074dff94edfad2ba9a0.
They have been fixed and seem reliable now.

3 years agoci/pkgtest: remove Ubuntu 21.10
Vladimír Čunát [Tue, 26 Jul 2022 16:26:12 +0000 (18:26 +0200)] 
ci/pkgtest: remove Ubuntu 21.10

It broke down and it isn't relevant anymore.

3 years agoMerge !1309: support (lib)knot 3.2 obs-knot-resolver-es11k1/deployments/2210
Vladimír Čunát [Tue, 26 Jul 2022 16:58:14 +0000 (18:58 +0200)] 
Merge !1309: support (lib)knot 3.2

3 years agoci: add job build-knot32
Vladimír Čunát [Fri, 17 Jun 2022 07:12:20 +0000 (09:12 +0200)] 
ci: add job build-knot32

That way we get at least basic testing before 3.2 is made default in CI.

3 years agoNEWS: now the support for libknot 3.2 should be complete
Vladimír Čunát [Wed, 15 Jun 2022 15:44:38 +0000 (17:44 +0200)] 
NEWS: now the support for libknot 3.2 should be complete

3 years agodaemon: adapt XDP to libknot 3.2
Vladimír Čunát [Wed, 15 Jun 2022 07:30:02 +0000 (09:30 +0200)] 
daemon: adapt XDP to libknot 3.2

3 years agoadapt to libknot 3.2 lower-casing knot_pkt_qname()
Vladimír Čunát [Wed, 15 Jun 2022 08:46:19 +0000 (10:46 +0200)] 
adapt to libknot 3.2 lower-casing knot_pkt_qname()

Our strategy was (and remains) that the in-header QNAME is overwritten
in-place, so most of our code was already (correctly) assuming that
knot_pkt_qname() returns lower-case only.  That simplifies this commit.

3 years agolua bindings: support libknot 3.2
Vladimír Čunát [Wed, 15 Jun 2022 07:26:46 +0000 (09:26 +0200)] 
lua bindings: support libknot 3.2

3 years agoMerge branch 'manager-utils-modeling' into 'manager'
Aleš Mrázek [Mon, 18 Jul 2022 10:55:25 +0000 (12:55 +0200)] 
Merge branch 'manager-utils-modeling' into 'manager'

manager: utils: modeling utils improvements

See merge request knot/knot-resolver!1320

3 years agomanager: utils: modeling: info about '-'/_'' conversion added to README
Aleš Mrázek [Thu, 14 Jul 2022 14:04:21 +0000 (16:04 +0200)] 
manager: utils: modeling: info about '-'/_'' conversion added to README

3 years agomanager: utils: modeling: BaseCustomType renamed to BaseValueType
Aleš Mrázek [Thu, 14 Jul 2022 11:44:11 +0000 (13:44 +0200)] 
manager: utils: modeling: BaseCustomType renamed to BaseValueType

3 years agomanager: tests: utils: directory for modeling tests
Aleš Mrázek [Wed, 13 Jul 2022 10:42:37 +0000 (12:42 +0200)] 
manager: tests: utils: directory for modeling tests

3 years agomanager: utils: modeling: docstrings updates
Aleš Mrázek [Wed, 13 Jul 2022 10:39:43 +0000 (12:39 +0200)] 
manager: utils: modeling: docstrings updates
-

3 years agoMerge !1317: ci/pkgtest: switch bad LXC builds to manual start obs-knot-resolver-es11k1/deployments/2197 obs-knot-resolver-es11k1/deployments/2198 obs-knot-resolver-es11k1/deployments/2199 obs-knot-resolver-es11k1/deployments/2200 obs-knot-resolver-es11k1/deployments/2201 obs-knot-resolver-es11k1/deployments/2202 obs-knot-resolver-es11k1/deployments/2203 obs-knot-resolver-es11k1/deployments/2204 obs-knot-resolver-es11k1/deployments/2205 obs-knot-resolver-es11k1/deployments/2206 obs-knot-resolver-es11k1/deployments/2207 obs-knot-resolver-es11k1/deployments/2208 obs-knot-resolver-es11k1/deployments/2209
Vladimír Čunát [Wed, 13 Jul 2022 09:34:03 +0000 (11:34 +0200)] 
Merge !1317: ci/pkgtest: switch bad LXC builds to manual start

3 years agomanager: utils: modeling: raise ValueError instead of DataValidationError in custom...
Aleš Mrázek [Wed, 13 Jul 2022 09:29:09 +0000 (11:29 +0200)] 
manager: utils: modeling: raise ValueError instead of DataValidationError in custom types

3 years agoci/pkgtest: switch bad LXC builds to manual start
Vladimír Čunát [Mon, 27 Jun 2022 08:37:13 +0000 (10:37 +0200)] 
ci/pkgtest: switch bad LXC builds to manual start

We've been unable to progress with these failures for some time,
and it's not good to have them red in CI all the time.
Manual start should allow easier testing of future fixes,
without doing the futile runs automatically.

3 years agoMerge !1321: Redirect webserv.lua stdout and stderr to /dev/null
Vladimír Čunát [Wed, 13 Jul 2022 09:04:50 +0000 (11:04 +0200)] 
Merge !1321: Redirect webserv.lua stdout and stderr to /dev/null

Fixes #758

3 years agoRedirect webserv.lua stdout and stderr to /dev/null
Héctor Molinero Fernández [Tue, 12 Jul 2022 19:29:26 +0000 (21:29 +0200)] 
Redirect webserv.lua stdout and stderr to /dev/null

Fixes a regression on Meson 0.57.0 that produces a timeout in config.ta_bootstrap test.

3 years agomanager: utils: modeling: naming improvements
Aleš Mrázek [Wed, 13 Jul 2022 08:39:39 +0000 (10:39 +0200)] 
manager: utils: modeling: naming improvements

3 years agomanager: utils: modeling: README update
Aleš Mrázek [Wed, 13 Jul 2022 08:23:10 +0000 (10:23 +0200)] 
manager: utils: modeling: README update

3 years agoMerge !1322: ci: confine docker and macOS jobs to main repository
Vladimír Čunát [Wed, 13 Jul 2022 07:26:03 +0000 (09:26 +0200)] 
Merge !1322: ci: confine docker and macOS jobs to main repository

3 years agoci: confine docker and macOS jobs to main repository
Oto Šťáva [Wed, 13 Jul 2022 06:21:48 +0000 (08:21 +0200)] 
ci: confine docker and macOS jobs to main repository

Some of our CI jobs use project-specific GitLab runners (e.g. requiring
the `dind` tag). The jobs then fail when someone forks the repository
and opens a merge request. This commit confines those jobs to the
`knot/knot-resolver` repository.

3 years agomanager: utils: modeling: simple documentation
Aleš Mrázek [Mon, 11 Jul 2022 09:49:56 +0000 (11:49 +0200)] 
manager: utils: modeling: simple documentation

3 years agomanager: utils: modeling: rename _PREVIOUS_SCHEMA to _LAYER
Aleš Mrázek [Mon, 11 Jul 2022 09:04:09 +0000 (11:04 +0200)] 
manager: utils: modeling: rename _PREVIOUS_SCHEMA  to _LAYER

3 years agoutils: modeling utils moved to separate directory
Aleš Mrázek [Fri, 8 Jul 2022 20:11:03 +0000 (22:11 +0200)] 
utils: modeling utils moved to separate directory

3 years agoMerge branch 'manager-supervisord-inversion-of-control' into 'manager'
Aleš Mrázek [Fri, 8 Jul 2022 13:19:54 +0000 (15:19 +0200)] 
Merge branch 'manager-supervisord-inversion-of-control' into 'manager'

manager: inverted process tree with supervisord

See merge request knot/knot-resolver!1319

3 years agomanager: tests: datamodel: 'id' removed from tests
Aleš Mrázek [Fri, 8 Jul 2022 13:15:03 +0000 (15:15 +0200)] 
manager: tests: datamodel: 'id' removed from tests

3 years agomanager: supervisord stops with non-zero exit code whenever manager enters FATAL...
Vasek Sraier [Thu, 7 Jul 2022 22:00:57 +0000 (00:00 +0200)] 
manager: supervisord stops with non-zero exit code whenever manager enters FATAL state

3 years agomanager: improved logging, no exceptions on shutdown -> now it looks almost as before...
Vasek Sraier [Thu, 7 Jul 2022 14:21:46 +0000 (16:21 +0200)] 
manager: improved logging, no exceptions on shutdown -> now it looks almost as before trying to invert the process tree

3 years agomanager: initial support for inverted process tree (manager running under a subproces...
Vasek Sraier [Thu, 7 Jul 2022 10:53:36 +0000 (12:53 +0200)] 
manager: initial support for inverted process tree (manager running under a subprocess manager started by manager)

3 years agoMerge !1315: hints.add_hosts(): respect comments anywhere in a line obs-knot-resolver-es11k1/deployments/2191 obs-knot-resolver-es11k1/deployments/2192 obs-knot-resolver-es11k1/deployments/2193 obs-knot-resolver-es11k1/deployments/2194 obs-knot-resolver-es11k1/deployments/2195 obs-knot-resolver-es11k1/deployments/2196
Vladimír Čunát [Thu, 7 Jul 2022 17:22:24 +0000 (19:22 +0200)] 
Merge !1315: hints.add_hosts(): respect comments anywhere in a line

3 years agohints.add_hosts(): respect comments anywhere in a line
Vladimír Čunát [Fri, 24 Jun 2022 07:29:38 +0000 (09:29 +0200)] 
hints.add_hosts(): respect comments anywhere in a line

3 years agohints tests: simple check of comment parsing
Vladimír Čunát [Fri, 24 Jun 2022 07:26:31 +0000 (09:26 +0200)] 
hints tests: simple check of comment parsing

3 years agoMerge branch 'manager-remove-systemd-support' into 'manager'
Aleš Mrázek [Thu, 7 Jul 2022 07:04:10 +0000 (09:04 +0200)] 
Merge branch 'manager-remove-systemd-support' into 'manager'

Remove systemd backend support

See merge request knot/knot-resolver!1318

3 years agomanager: datamodel: watchdog section removed
Aleš Mrázek [Thu, 7 Jul 2022 06:48:40 +0000 (08:48 +0200)] 
manager: datamodel: watchdog section removed

3 years agomanager: reorganization of manager startup and subprocess controller selection
Vasek Sraier [Tue, 5 Jul 2022 09:56:01 +0000 (11:56 +0200)] 
manager: reorganization of manager startup and subprocess controller selection

3 years agomanager: updated poethepoet to prevent exceptions when stopping dev run
Vasek Sraier [Tue, 5 Jul 2022 09:55:21 +0000 (11:55 +0200)] 
manager: updated poethepoet to prevent exceptions when stopping dev run

3 years agomanager: datamodel: supervisor section removed
Aleš Mrázek [Mon, 4 Jul 2022 16:24:58 +0000 (18:24 +0200)] 
manager: datamodel: supervisor section removed
- watchdog moved to top-level

3 years agofix manager's gitlab CI config usage of removed features
Vasek Sraier [Mon, 4 Jul 2022 12:03:41 +0000 (14:03 +0200)] 
fix manager's gitlab CI config usage of removed features

3 years agomanager: remove systemd support
Vasek Sraier [Fri, 24 Jun 2022 15:20:00 +0000 (17:20 +0200)] 
manager: remove systemd support

Why? Because it is dangerous to use. You'd have to run manager with root privileges
to be able to spawn systemd services via DBus. There is an option to do the same
with session instances of systemd, but that is unpackageable and pretty much unusable
in production. We will therefore rely on supervisord, as it's support got much better
recently.

3 years agoMerge branch 'manager-supervisord-improvements' into 'manager'
Vaclav Sraier [Mon, 4 Jul 2022 15:28:19 +0000 (17:28 +0200)] 
Merge branch 'manager-supervisord-improvements' into 'manager'

supervisord improvements

See merge request knot/knot-resolver!1280

3 years agoMerge !1314: daemon/tls: fix a double-free for some cases of policy.TLS_FORWARD obs-knot-resolver-es11k1/deployments/2183 obs-knot-resolver-es11k1/deployments/2184 obs-knot-resolver-es11k1/deployments/2185 obs-knot-resolver-es11k1/deployments/2186 obs-knot-resolver-es11k1/deployments/2187 obs-knot-resolver-es11k1/deployments/2188 obs-knot-resolver-es11k1/deployments/2189 obs-knot-resolver-es11k1/deployments/2190
Vladimír Čunát [Wed, 29 Jun 2022 08:53:40 +0000 (10:53 +0200)] 
Merge !1314: daemon/tls: fix a double-free for some cases of policy.TLS_FORWARD

3 years agodaemon/tls: fix a double-free for some cases of policy.TLS_FORWARD
Oto Šťáva [Thu, 23 Jun 2022 08:14:58 +0000 (10:14 +0200)] 
daemon/tls: fix a double-free for some cases of policy.TLS_FORWARD

The double-free may have happened in some cases when the upstream
resolver was stopped while answering a forwarded query. I was reliably
reproducing it by running resperf on two kresd instances with one forwarded
to the other, and killing the upstream one.

3 years agoMerge !1310: modules/priming: downgrade logs to 'info' level obs-knot-resolver-es11k1/deployments/2181 obs-knot-resolver-es11k1/deployments/2182
Vladimír Čunát [Mon, 27 Jun 2022 08:36:29 +0000 (10:36 +0200)] 
Merge !1310: modules/priming: downgrade logs to 'info' level

3 years agomodules/priming: downgrade logs to 'info' level
Vladimír Čunát [Thu, 16 Jun 2022 08:15:31 +0000 (10:15 +0200)] 
modules/priming: downgrade logs to 'info' level

When kresd starts without working internet connection, these would spam
logs by default every 10 seconds, which doesn't seem useful.

3 years agomodules/priming: don't warn against unloading it
Vladimír Čunát [Thu, 16 Jun 2022 08:12:22 +0000 (10:12 +0200)] 
modules/priming: don't warn against unloading it

I can't see sufficient motivation here.  The cache will be slightly
less ready, but it's not often that you need to contact a root server.

Most importantly, kresd must work well anyway, even with empty cache.
Also, the compiled-in address set of root servers should be quite
accurate - the NS set has never changed, and the last address change
was five years ago with just one of 26 records changing.

3 years agoMerge !1316: nit: daemon/http: remove dead code
Vladimír Čunát [Mon, 27 Jun 2022 07:31:48 +0000 (09:31 +0200)] 
Merge !1316: nit: daemon/http: remove dead code

3 years agonit: daemon/http: remove dead code
Oto Šťáva [Mon, 27 Jun 2022 05:37:58 +0000 (07:37 +0200)] 
nit: daemon/http: remove dead code

3 years agomanager: optimized supervisord process startup by using custom version of XML-RPC API
Vasek Sraier [Fri, 24 Jun 2022 15:34:49 +0000 (17:34 +0200)] 
manager: optimized supervisord process startup by using custom version of XML-RPC API

3 years agomanager: fix bad config schema definition
Vasek Sraier [Sat, 18 Jun 2022 22:14:35 +0000 (00:14 +0200)] 
manager: fix bad config schema definition

3 years agomanager: more startup logging and small supervisord detection optimization
Vasek Sraier [Sat, 18 Jun 2022 21:55:50 +0000 (23:55 +0200)] 
manager: more startup logging and small supervisord detection optimization

3 years agomanager: bug fix: utility function to spawn subprocesses did not unblock signals...
Vasek Sraier [Sat, 18 Jun 2022 21:16:05 +0000 (23:16 +0200)] 
manager: bug fix: utility function to spawn subprocesses did not unblock signals, so spawned processes could not be stopped properly

3 years agoconfigured build system for native C extensions
Vasek Sraier [Fri, 17 Jun 2022 22:42:08 +0000 (00:42 +0200)] 
configured build system for native C extensions

3 years agomade supervisord sd_notify() plugin properly functional + supervisord config changes
Vasek Sraier [Fri, 17 Jun 2022 13:03:43 +0000 (15:03 +0200)] 
made supervisord sd_notify() plugin properly functional + supervisord config changes

- X-SUPERVISORD-TYPE=notify in a process's environment should make the process behave similarly to Type=notify systemd service units
- startsec with the above means time, after which it will get killed without ready notification

3 years agomanager: experimental implementation of supervisord extension to support sd_notify()
Vasek Sraier [Wed, 25 May 2022 13:03:14 +0000 (15:03 +0200)] 
manager: experimental implementation of supervisord extension to support sd_notify()

contains:
- python module written in C, because Python does not support socket auxiliary messages like SCM_CREDENTIALS
- XML-RPC extension for supervisord, which actually does not do anything except for injecting code into supervisord internals

3 years agochanged supervisord controller so that we don't need to be rewriting config with...
Vasek Sraier [Sat, 26 Mar 2022 21:56:53 +0000 (22:56 +0100)] 
changed supervisord controller so that we don't need to be rewriting config with every change

3 years agomanager: add time since startup to logs
Vasek Sraier [Sat, 26 Mar 2022 21:56:09 +0000 (22:56 +0100)] 
manager: add time since startup to logs

3 years agoMerge !1311: daemon/http: improve URI checks obs-knot-resolver-es11k1/deployments/2177 obs-knot-resolver-es11k1/deployments/2178 obs-knot-resolver-es11k1/deployments/2179 obs-knot-resolver-es11k1/deployments/2180
Vladimír Čunát [Thu, 23 Jun 2022 07:39:54 +0000 (09:39 +0200)] 
Merge !1311: daemon/http: improve URI checks

Fixes #746

3 years agoMerge branch 'manager-datamodel-policy' into 'manager'
Aleš Mrázek [Tue, 21 Jun 2022 09:55:34 +0000 (11:55 +0200)] 
Merge branch 'manager-datamodel-policy' into 'manager'

manager: datamodel: policy improvements

See merge request knot/knot-resolver!1312

3 years agomanager: datamodel: policy: action validation refactored
Aleš Mrázek [Tue, 21 Jun 2022 09:45:04 +0000 (11:45 +0200)] 
manager: datamodel: policy: action validation refactored

3 years agomanager: datamodel: removed 'Dict' from policy sections
Aleš Mrázek [Mon, 20 Jun 2022 20:35:58 +0000 (22:35 +0200)] 
manager: datamodel:  removed 'Dict' from policy sections
- related to #702

3 years agomanager: datamodel: slices: actions validation
Aleš Mrázek [Fri, 17 Jun 2022 22:12:31 +0000 (00:12 +0200)] 
manager: datamodel: slices: actions validation

3 years agodaemon/http: improve URI checks obs-knot-resolver-bs4hbr/deployments/2173
Oto Šťáva [Fri, 17 Jun 2022 08:57:58 +0000 (10:57 +0200)] 
daemon/http: improve URI checks

The `check_uri()` function now only checks that the endpoint is either
`/doh` or `/dns-query`. Parameter checks were moved into
`process_uri_path()` so that the check only takes place for GET
requests. POST requests now do not care about parameters at all.

3 years agomanager: datamodel: policy: forward action validation
Aleš Mrázek [Wed, 15 Jun 2022 12:54:33 +0000 (14:54 +0200)] 
manager: datamodel: policy: forward action validation

3 years agoMerge branch 'release-5-5-1' into 'master' obs-knot-resolver-8xyvhu/deployments/2162 obs-knot-resolver-8xyvhu/deployments/2166 obs-knot-resolver-bs4hbr/deployments/2163 obs-knot-resolver-es11k1/deployments/2167 obs-knot-resolver-es11k1/deployments/2168 obs-knot-resolver-es11k1/deployments/2169 obs-knot-resolver-es11k1/deployments/2170 obs-knot-resolver-es11k1/deployments/2172 obs-knot-resolver-es11k1/deployments/2174 obs-knot-resolver-es11k1/deployments/2175 obs-knot-resolver-es11k1/deployments/2176 obs-knot-resolver-kv62s6/deployments/2161 obs-knot-resolver-kv62s6/deployments/2164 obs-knot-resolver-kv62s6/deployments/2165 v5.5.1
Aleš Mrázek [Tue, 14 Jun 2022 07:13:12 +0000 (09:13 +0200)] 
Merge branch 'release-5-5-1' into 'master'

release 5.5.1

See merge request knot/knot-resolver!1308

3 years agoNEWS: date update
Aleš Mrázek [Tue, 14 Jun 2022 06:54:46 +0000 (08:54 +0200)] 
NEWS: date update

3 years agoci/images: git://github.com won't work anymore obs-knot-resolver-bs4hbr/deployments/2158 obs-knot-resolver-bs4hbr/deployments/2159
Vladimír Čunát [Mon, 13 Jun 2022 18:33:22 +0000 (20:33 +0200)] 
ci/images: git://github.com won't work anymore

3 years agoAUTHORS update obs-knot-resolver-bs4hbr/deployments/2157
Aleš Mrázek [Mon, 13 Jun 2022 12:30:04 +0000 (14:30 +0200)] 
AUTHORS update

3 years agorelease 5.5.1
Aleš Mrázek [Mon, 13 Jun 2022 11:40:58 +0000 (13:40 +0200)] 
release 5.5.1

3 years agomanager: datamodel: policy: forward-tls action removed
Aleš Mrázek [Sun, 12 Jun 2022 15:33:37 +0000 (17:33 +0200)] 
manager: datamodel: policy: forward-tls action removed
- ForwardServerSchema moved to policy_schema module

3 years agomanager: datamodel: policy: schema extended by new policy actions
Aleš Mrázek [Fri, 10 Jun 2022 14:33:04 +0000 (16:33 +0200)] 
manager: datamodel: policy: schema extended by new policy actions
- policy schema tests improved

3 years agomanager: datamodel: logging module renamed
Aleš Mrázek [Thu, 9 Jun 2022 20:48:29 +0000 (22:48 +0200)] 
manager: datamodel: logging module renamed

3 years agoMerge !1307: tests/config: improve difference prints of tables obs-knot-resolver-es11k1/deployments/2153 obs-knot-resolver-es11k1/deployments/2154 obs-knot-resolver-es11k1/deployments/2155 obs-knot-resolver-es11k1/deployments/2156 obs-knot-resolver-es11k1/deployments/2160
Vladimír Čunát [Thu, 9 Jun 2022 12:51:54 +0000 (14:51 +0200)] 
Merge !1307: tests/config: improve difference prints of tables

3 years agotests/config: improve difference prints of tables
Vladimír Čunát [Thu, 9 Jun 2022 12:45:57 +0000 (14:45 +0200)] 
tests/config: improve difference prints of tables

3 years agoMerge !1306: renumber: get rid of netmask limitation, now support any netmask
Vladimír Čunát [Thu, 9 Jun 2022 11:42:35 +0000 (13:42 +0200)] 
Merge !1306: renumber: get rid of netmask limitation, now support any netmask

3 years agorenumber: fix incorrect masking of bytes after netmask boundary
Oto Šťáva [Thu, 9 Jun 2022 06:28:02 +0000 (08:28 +0200)] 
renumber: fix incorrect masking of bytes after netmask boundary

(we changed the original fix a bit)

3 years agorenumber: test for arbitrary netmask
Oto Šťáva [Thu, 9 Jun 2022 06:10:48 +0000 (08:10 +0200)] 
renumber: test for arbitrary netmask

3 years agorenumber: get rid of netmask limitation, now support any netmask
cronfy [Sat, 4 Jun 2022 13:48:44 +0000 (17:48 +0400)] 
renumber: get rid of netmask limitation, now support any netmask

(with minor cleanups from vcunat)

3 years agoMerge !1299: tweak inlining
Vladimír Čunát [Thu, 9 Jun 2022 09:20:36 +0000 (11:20 +0200)] 
Merge !1299: tweak inlining

3 years agoci: fixup lint:scan-build
Vladimír Čunát [Tue, 24 May 2022 13:20:52 +0000 (15:20 +0200)] 
ci: fixup lint:scan-build

I have no idea why this one appeared right now (part not touched),
and it does not make sense at all:

../../../lib/utils.c:524:20: warning: Out of bound memory access (accessed memory precedes memory block)
        buf[len_need - 1] = 0;
        ~~~~~~~~~~~~~~~~~~^~~

3 years agotweak inlining
Vladimír Čunát [Tue, 24 May 2022 09:35:14 +0000 (11:35 +0200)] 
tweak inlining

I used -Winline (optimizing, gcc 11 or 12) to gather warnings
about cases that were considered too expensive for inlining.
Some of these probably used not to happen when we were dropping
assertions during preprocessing in -DNDEBUG builds.
This commit mainly improves size of the compiled binary by several KiB.

- queue_head_impl(): optionally (un)inline; not big but in warnings
- queue_pop_impl(): uninline; too complex for my today's eyes
- kr_rand_bytes(): optionally (un)inline
  The inlining potential there comes from calling with a constant.
- kr_straddr(): uninline.  It's never been meant for hot code,
  and this gives us large savings due to deduplicating the static array.
- For some I couldn't see a good resolution due to restrictions in C.

C hint: `static inline` is probably well known;
the other inline combination is well explained at:
https://stackoverflow.com/a/6312813/587396

3 years agomanager: datamodel: policy: validation refactored
Aleš Mrázek [Thu, 9 Jun 2022 09:05:12 +0000 (11:05 +0200)] 
manager: datamodel: policy: validation refactored
- forward_zone.py renamed to forward_zone_schema.py

3 years agoMerge !1298: lib/selection: improve IPv6 avoidance if broken + debug logs
Vladimír Čunát [Thu, 9 Jun 2022 07:22:24 +0000 (09:22 +0200)] 
Merge !1298: lib/selection: improve IPv6 avoidance if broken + debug logs

3 years agolib/selection debug logs: print one more line
Vladimír Čunát [Tue, 24 May 2022 08:36:50 +0000 (10:36 +0200)] 
lib/selection debug logs: print one more line

And that made the "NO6: is KO" line extraneous.
Example in context:
[select][14162.01]   => id: '15271' choosing from addresses: 0 v4 + 1 v6; names to resolve: 6 v4 + 5 v6; force_resolve: 0; NO6: IPv6 is OK
[select][14162.01]   => id: '15271' choosing: 'ns1.p31.dynect.net.'@'2600:2000:2210::31#00053' with timeout 774 ms zone cut: 'amazon.com.'
[select][14162.01]   => id: '15271' updating: 'ns1.p31.dynect.net.'@'2600:2000:2210::31#00053' zone cut: 'amazon.com.' with rtt 316 to srtt: 311 and variance: 89

3 years agolib/selection: improve IPv6 avoidance if broken
Vladimír Čunát [Tue, 24 May 2022 07:02:53 +0000 (09:02 +0200)] 
lib/selection: improve IPv6 avoidance if broken

It was still possible to get into a deadlock here.
https://forum.turris.cz/t/not-connecting-to-applications-like-discord/17111/7
If A records for a NS fell out of cache but AAAA remained,
with probability 1-\epsilon we'd choose an AAAA address
even if IPv6 was considered broken.

I looked at *the whole* no6 strategy again, and I do think that
there are no such holes anymore.  A few percent attempts will still
go over IPv6 even if it's considered broken, but that sounds OK-ish.

3 years agomanager: datamodel: templates: jinja2 macros for policy.slice()
Aleš Mrázek [Wed, 8 Jun 2022 15:51:20 +0000 (17:51 +0200)] 
manager: datamodel: templates: jinja2 macros for policy.slice()

3 years agomanager: datamodel: slices section created
Aleš Mrázek [Tue, 7 Jun 2022 20:25:03 +0000 (22:25 +0200)] 
manager: datamodel: slices section created

3 years agoMerge !1304: tests/packaging: print build_log of failed commands obs-knot-resolver-es11k1/deployments/2150 obs-knot-resolver-es11k1/deployments/2151 obs-knot-resolver-es11k1/deployments/2152
Vladimír Čunát [Mon, 6 Jun 2022 14:10:38 +0000 (16:10 +0200)] 
Merge !1304: tests/packaging: print build_log of failed commands

3 years agotests/packaging: print build_log of failed commands
Oto Šťáva [Wed, 1 Jun 2022 11:34:12 +0000 (13:34 +0200)] 
tests/packaging: print build_log of failed commands

3 years agoMerge !1284: ci: add x86+arm matrices where simple obs-knot-resolver-es11k1/deployments/2148 obs-knot-resolver-es11k1/deployments/2149
Vladimír Čunát [Sat, 4 Jun 2022 13:55:41 +0000 (15:55 +0200)] 
Merge !1284: ci: add x86+arm matrices where simple

3 years agoci docker: make into a x86+arm matrix
Vladimír Čunát [Thu, 7 Apr 2022 18:44:05 +0000 (20:44 +0200)] 
ci docker: make into a x86+arm matrix

No other job can do it, as we don't have docker images ready for that,
and the usual manual workflow won't be well usable with arm64.
We'll need to convert their generation to (manual?) CI schedules.

3 years agoci/pkgtest: make nixos-unstable into a x86+arm matrix
Vladimír Čunát [Thu, 7 Apr 2022 17:29:04 +0000 (19:29 +0200)] 
ci/pkgtest: make nixos-unstable into a x86+arm matrix

Other pkgtest jobs can't do this, as they're designed for LXC
and we don't have an arm+LXC runner.

3 years agoMerge !1305: nits: abort() and #include
Vladimír Čunát [Sat, 4 Jun 2022 13:34:43 +0000 (15:34 +0200)] 
Merge !1305: nits: abort() and #include

3 years agodrop unused #include lines
Vladimír Čunát [Fri, 3 Jun 2022 15:52:25 +0000 (17:52 +0200)] 
drop unused #include lines

https://clangd.llvm.org/design/include-cleaner
Though somehow I'm all the time getting false positives for
"daemon/bindings/impl.h"

3 years agoreplace some occurrences of abort() by kr_require()
Vladimír Čunát [Fri, 3 Jun 2022 15:29:41 +0000 (17:29 +0200)] 
replace some occurrences of abort() by kr_require()

It provides more information and the condition is typically
easier to read, too.

3 years agoMerge !1303: meson nit: deal with warning about future of run_command obs-knot-resolver-es11k1/deployments/2146 obs-knot-resolver-es11k1/deployments/2147
Vladimír Čunát [Wed, 1 Jun 2022 08:38:50 +0000 (10:38 +0200)] 
Merge !1303: meson nit: deal with warning about future of run_command

3 years agomeson nit: deal with warning about future of run_command
Vladimír Čunát [Mon, 30 May 2022 11:48:16 +0000 (13:48 +0200)] 
meson nit: deal with warning about future of run_command

WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300

In almost all cases we already check the return code explicitly
and throw a more descriptive message than what would be the default.

3 years agoMerge !1302: renumber: allow renumbering a subnet to a single IP
Vladimír Čunát [Wed, 1 Jun 2022 08:09:42 +0000 (10:09 +0200)] 
Merge !1302: renumber: allow renumbering a subnet to a single IP

3 years agorenumber: named local variables for readability
Oto Šťáva [Wed, 1 Jun 2022 07:49:25 +0000 (09:49 +0200)] 
renumber: named local variables for readability

3 years agorenumber: add test for single IP rewrite
Oto Šťáva [Wed, 1 Jun 2022 07:48:28 +0000 (09:48 +0200)] 
renumber: add test for single IP rewrite