]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
2 years agoci pytests: migrate away from LXC runner
Vladimír Čunát [Wed, 26 Oct 2022 15:55:35 +0000 (17:55 +0200)] 
ci pytests: migrate away from LXC runner

This reverts commit 15c1353544be, with some modifications.
On LXC we've had issues with
  FileExistsError: [Errno 17] File exists: '/tmp/pytest-kresd-portdir'
.. which disappear with this commit.  (I don't know how/why.)

2 years agoMerge !1357: doc XDP: update the list of required capabilities
Vladimír Čunát [Thu, 3 Nov 2022 09:04:42 +0000 (10:04 +0100)] 
Merge !1357: doc XDP: update the list of required capabilities

2 years agodoc XDP: update the list of required capabilities
Vladimír Čunát [Thu, 27 Oct 2022 15:31:07 +0000 (17:31 +0200)] 
doc XDP: update the list of required capabilities

We're the same as knotd in this; it evolved a bit
with libknot and kernel versions.  Taken from:
https://www.knot-dns.cz/docs/3.2/singlehtml/#mode-xdp-pre-requisites

2 years agoMerge !1355: daemon/network: fix heap-buffer-overflow in endpoint key generation
Vladimír Čunát [Tue, 25 Oct 2022 07:09:49 +0000 (09:09 +0200)] 
Merge !1355: daemon/network: fix heap-buffer-overflow in endpoint key generation

2 years agodaemon/network: fix heap-buffer-overflow in endpoint key generation
Oto Šťáva [Thu, 20 Oct 2022 11:06:31 +0000 (13:06 +0200)] 
daemon/network: fix heap-buffer-overflow in endpoint key generation

Reproducible by listening on an interface by name, ASAN reports a
heap-buffer-overflow. This was a regression caused by !1286, which did
not account for null-terminators properly.

2 years agoMerge !1349: modules/dns64: add recommendation to also disable DNS64 via IPv4
Vladimír Čunát [Fri, 14 Oct 2022 11:57:03 +0000 (13:57 +0200)] 
Merge !1349: modules/dns64: add recommendation to also disable DNS64 via IPv4

2 years agomodules/dns64: add recommendation to also disable DNS64 via IPv4
Tom Herbers [Sat, 8 Oct 2022 12:43:52 +0000 (14:43 +0200)] 
modules/dns64: add recommendation to also disable DNS64 via IPv4

It's resonable to assume that people would also want to disable DNS64 for
IPv4 source addresses if they only enable it for some IPv6 sources.

Close https://github.com/CZ-NIC/knot-resolver/pull/83

2 years agoMerge !1352: ci nixos-unstable:pkgbuild: fixup recent regression
Vladimír Čunát [Fri, 14 Oct 2022 11:22:50 +0000 (13:22 +0200)] 
Merge !1352: ci nixos-unstable:pkgbuild: fixup recent regression

2 years agoci nixos-unstable:pkgbuild: fixup recent regression
Vladimír Čunát [Fri, 14 Oct 2022 11:16:38 +0000 (13:16 +0200)] 
ci nixos-unstable:pkgbuild: fixup recent regression

https://gitlab.nic.cz/knot/knot-resolver/-/jobs/802541#L272

2 years agoMerge !1348: ci/images/debian-11: drop go
Vladimír Čunát [Mon, 10 Oct 2022 13:59:41 +0000 (15:59 +0200)] 
Merge !1348: ci/images/debian-11: drop go

2 years agoci/images/debian-11: drop go
Vladimír Čunát [Fri, 7 Oct 2022 13:24:00 +0000 (15:24 +0200)] 
ci/images/debian-11: drop go

I don't know how to fix building the image with it.
A few things were tried around different go versions (from -backports).

2 years agoMerge branch 'release-5.5.3' into 'master' obs-knot-resolver-8xyvhu/deployments/2281 obs-knot-resolver-es11k1/deployments/2282 obs-knot-resolver-es11k1/deployments/2284 obs-knot-resolver-es11k1/deployments/2285 obs-knot-resolver-es11k1/deployments/2286 obs-knot-resolver-es11k1/deployments/2287 obs-knot-resolver-es11k1/deployments/2288 obs-knot-resolver-es11k1/deployments/2289 obs-knot-resolver-es11k1/deployments/2290 obs-knot-resolver-es11k1/deployments/2291 obs-knot-resolver-es11k1/deployments/2293 obs-knot-resolver-es11k1/deployments/2294 obs-knot-resolver-es11k1/deployments/2295 obs-knot-resolver-es11k1/deployments/2296 obs-knot-resolver-es11k1/deployments/2297 obs-knot-resolver-kv62s6/deployments/2280 v5.5.3
Aleš Mrázek [Wed, 21 Sep 2022 12:09:25 +0000 (14:09 +0200)] 
Merge branch 'release-5.5.3' into 'master'

release 5.5.3

See merge request knot/knot-resolver!1343

2 years agorelease 5.5.3 obs-knot-resolver-bs4hbr/deployments/2275 obs-knot-resolver-bs4hbr/deployments/2279
Vladimír Čunát [Fri, 16 Sep 2022 11:28:52 +0000 (13:28 +0200)] 
release 5.5.3

2 years agolib/zonecut + iterator: limit large NS sets
Vladimír Čunát [Wed, 17 Aug 2022 14:34:06 +0000 (16:34 +0200)] 
lib/zonecut + iterator: limit large NS sets

It's a mitigation for CVE-2022-40188 and similar DoS attempts.
It's using really trivial approaches, at least for now.

2 years agoMerge !1340: ci macOS: add Knot 3.2 obs-knot-resolver-es11k1/deployments/2249 obs-knot-resolver-es11k1/deployments/2250 obs-knot-resolver-es11k1/deployments/2251 obs-knot-resolver-es11k1/deployments/2252 obs-knot-resolver-es11k1/deployments/2253 obs-knot-resolver-es11k1/deployments/2255 obs-knot-resolver-es11k1/deployments/2256 obs-knot-resolver-es11k1/deployments/2257 obs-knot-resolver-es11k1/deployments/2258 obs-knot-resolver-es11k1/deployments/2259 obs-knot-resolver-es11k1/deployments/2260 obs-knot-resolver-es11k1/deployments/2261 obs-knot-resolver-es11k1/deployments/2262 obs-knot-resolver-es11k1/deployments/2263 obs-knot-resolver-es11k1/deployments/2264 obs-knot-resolver-es11k1/deployments/2265 obs-knot-resolver-es11k1/deployments/2266 obs-knot-resolver-es11k1/deployments/2267 obs-knot-resolver-es11k1/deployments/2268 obs-knot-resolver-es11k1/deployments/2269 obs-knot-resolver-es11k1/deployments/2270 obs-knot-resolver-es11k1/deployments/2271 obs-knot-resolver-es11k1/deployments/2272 obs-knot-resolver-es11k1/deployments/2273 obs-knot-resolver-es11k1/deployments/2274
Vladimír Čunát [Fri, 26 Aug 2022 10:46:42 +0000 (12:46 +0200)] 
Merge !1340: ci macOS: add Knot 3.2

2 years agoci macOS: add Knot 3.2
Oto Šťáva [Fri, 26 Aug 2022 10:46:42 +0000 (12:46 +0200)] 
ci macOS: add Knot 3.2

2 years agoMerge !1339: cache test: loosen conditions on cache usage obs-knot-resolver-es11k1/deployments/2248
Vladimír Čunát [Thu, 25 Aug 2022 19:17:10 +0000 (21:17 +0200)] 
Merge !1339: cache test: loosen conditions on cache usage

2 years agoNEWS: mention config_tests for macOS
Vladimír Čunát [Thu, 25 Aug 2022 19:14:25 +0000 (21:14 +0200)] 
NEWS: mention config_tests for macOS

2 years agocache test: loosen conditions on cache usage
Vladimír Čunát [Thu, 25 Aug 2022 16:02:03 +0000 (18:02 +0200)] 
cache test: loosen conditions on cache usage

This fixes config_tests on aarch64 macOS.
The key difference is that they use 16k pages,
so LMDB space usage also behaves a bit different.

2 years agoMerge !1338: macOS nits obs-knot-resolver-es11k1/deployments/2247
Vladimír Čunát [Wed, 24 Aug 2022 16:04:34 +0000 (18:04 +0200)] 
Merge !1338: macOS nits

2 years agotests/config: skip `freebind` sub-test on macOS
Vladimír Čunát [Wed, 24 Aug 2022 09:51:49 +0000 (11:51 +0200)] 
tests/config: skip `freebind` sub-test on macOS

That option isn't supported there, so the test wouldn't work.
Now the config tests work for me on x86 macOS.

2 years agodaemon/http nit: silence a warning
Vladimír Čunát [Wed, 24 Aug 2022 09:50:14 +0000 (11:50 +0200)] 
daemon/http nit: silence a warning

Enums are more like ints anyway (in standard),
even when drawn from a small subset.

2 years agodaemon/io: log another message if `freebind` isn't supported
Vladimír Čunát [Wed, 24 Aug 2022 08:58:26 +0000 (10:58 +0200)] 
daemon/io: log another message if `freebind` isn't supported

So far the message wasn't pointing to freebind at all:
[net   ] bind to '::1@53' (UDP): Operation not supported

I used preprocessor to avoid duplication and unused warnings.

Another way would be to ignore the freebind option if not supported,
but I think it's better to convince users not to specify it.

2 years agoMerge branch 'release-5.5.2' into 'master' obs-knot-resolver-8xyvhu/deployments/2238 obs-knot-resolver-bs4hbr/deployments/2276 obs-knot-resolver-bs4hbr/deployments/2277 obs-knot-resolver-es11k1/deployments/2239 obs-knot-resolver-es11k1/deployments/2240 obs-knot-resolver-es11k1/deployments/2241 obs-knot-resolver-es11k1/deployments/2242 obs-knot-resolver-es11k1/deployments/2243 obs-knot-resolver-es11k1/deployments/2244 obs-knot-resolver-es11k1/deployments/2245 obs-knot-resolver-es11k1/deployments/2246 obs-knot-resolver-kv62s6/deployments/2237 v5.5.2
Aleš Mrázek [Tue, 16 Aug 2022 11:43:52 +0000 (13:43 +0200)] 
Merge branch 'release-5.5.2' into 'master'

release 5.5.2

See merge request knot/knot-resolver!1337

2 years agoci OBS: replace Ubuntu 21.10 by 22.04 obs-knot-resolver-bs4hbr/deployments/2236
Vladimír Čunát [Tue, 16 Aug 2022 07:46:29 +0000 (09:46 +0200)] 
ci OBS: replace Ubuntu 21.10 by 22.04

21.10 isn't supported anymore, which is probably why it's failing.

2 years agoci OBS: replace Fedora 34 by 36
Vladimír Čunát [Tue, 16 Aug 2022 07:40:06 +0000 (09:40 +0200)] 
ci OBS: replace Fedora 34 by 36

We've already done that on OBS side, which is probably why it's failing.

2 years agorelease 5.5.2
Aleš Mrázek [Mon, 15 Aug 2022 13:52:16 +0000 (15:52 +0200)] 
release 5.5.2

2 years agodoc nit: fix broken link, luacov home moved
Vladimír Čunát [Mon, 15 Aug 2022 09:45:32 +0000 (11:45 +0200)] 
doc nit: fix broken link, luacov home moved

https://github.com/lunarmodules/luacov/issues/99

2 years agoNEWS nit: prefer imperative formulations
Vladimír Čunát [Sun, 14 Aug 2022 15:15:18 +0000 (17:15 +0200)] 
NEWS nit: prefer imperative formulations

We're mostly using those in NEWS and first line of commit messages.
I'm not sure if they're much better than alternatives, but at least
consistency is nice.

2 years agoMerge !1328: daemon/worker: drop caching of kr_request mempools obs-knot-resolver-es11k1/deployments/2226 obs-knot-resolver-es11k1/deployments/2227 obs-knot-resolver-es11k1/deployments/2228 obs-knot-resolver-es11k1/deployments/2229 obs-knot-resolver-es11k1/deployments/2233
Vladimír Čunát [Thu, 11 Aug 2022 09:57:09 +0000 (11:57 +0200)] 
Merge !1328: daemon/worker: drop caching of kr_request mempools

2 years agodaemon/worker: drop caching of kr_request mempools
Vladimír Čunát [Wed, 3 Aug 2022 14:52:01 +0000 (16:52 +0200)] 
daemon/worker: drop caching of kr_request mempools

This caused a huge increase in real memory usage in case of queries
arriving to kresd while being disconnected from internet.
The usage was slowly creeping up, even over 2G.

Interesting past commits: b350d38d and two preceding.

There apparently was no real memory leak.  I assume that reusal of
long-living mempools is risky in terms of memory fragmentation,
though the extent of the issue surprised me very much.
The issue seemed the same with normal glibc and jemalloc.

I generally dislike ad-hoc optimization attempts like these freelists.
Now the allocator can better decide *itself* how to reuse memory.

2 years agodaemon/worker: drop a long unused #define
Vladimír Čunát [Wed, 3 Aug 2022 14:39:02 +0000 (16:39 +0200)] 
daemon/worker: drop a long unused #define

2 years agoMerge !1336: lib/generic/array: avoid quadratic work for long arrays obs-knot-resolver-es11k1/deployments/2224 obs-knot-resolver-es11k1/deployments/2225
Vladimír Čunát [Tue, 9 Aug 2022 07:47:32 +0000 (09:47 +0200)] 
Merge !1336: lib/generic/array: avoid quadratic work for long arrays

2 years agolib/generic/array: avoid quadratic work for long arrays
Vladimír Čunát [Mon, 8 Aug 2022 16:40:15 +0000 (18:40 +0200)] 
lib/generic/array: avoid quadratic work for long arrays

For long arrays we really want to increase their length by a fraction.
Otherwise it will cost lots of CPU.  Doubling seems customary,
though I could imagine e.g. keeping the +50% growth on longest arrays.

I finally got sufficiently angry with this piece of code when debugging
https://forum.turris.cz/t/how-to-debug-a-custom-hosts-file-for-kresd/17449
though in that case it wasn't the main source of inefficiency.

CI: two of the mysterious/bogus warnings around arrays disappeared.

2 years agoMerge !1334: modules/renumber: fix renumber.name behaviour obs-knot-resolver-es11k1/deployments/2223
Vladimír Čunát [Mon, 8 Aug 2022 15:01:45 +0000 (17:01 +0200)] 
Merge !1334: modules/renumber: fix renumber.name behaviour

Fixes #760

2 years agomodules/renumber: fix renumber.name behaviour
Oto Šťáva [Mon, 8 Aug 2022 11:36:22 +0000 (13:36 +0200)] 
modules/renumber: fix renumber.name behaviour

Fixes #760.

Also removes a warning in policy.REROUTE that is no longer true.

2 years agoMerge !1333: lib/log: Coverity Scan nits
Vladimír Čunát [Mon, 8 Aug 2022 14:05:12 +0000 (16:05 +0200)] 
Merge !1333: lib/log: Coverity Scan nits

2 years agolib/log: Coverity Scan nits
Oto Šťáva [Mon, 8 Aug 2022 11:03:32 +0000 (13:03 +0200)] 
lib/log: Coverity Scan nits

Fixes CIDs 355763 and 355764. Also fixes a minor typo.

2 years agoMerge !1332{ ci/images/README: clarify build.sh for Coverity Scan
Vladimír Čunát [Mon, 8 Aug 2022 09:41:24 +0000 (11:41 +0200)] 
Merge !1332{ ci/images/README: clarify build.sh for Coverity Scan

2 years agoci/images/README: clarify usage of build.sh for Coverity Scan
Oto Šťáva [Mon, 8 Aug 2022 07:34:02 +0000 (09:34 +0200)] 
ci/images/README: clarify usage of build.sh for Coverity Scan

2 years agoMerge !1329: README.md: distro updates
Vladimír Čunát [Mon, 8 Aug 2022 09:40:09 +0000 (11:40 +0200)] 
Merge !1329: README.md: distro updates

2 years agoREADME.md: use a working link for Fedora
Vladimír Čunát [Fri, 5 Aug 2022 12:39:40 +0000 (14:39 +0200)] 
README.md: use a working link for Fedora

2 years agoREADME.md: update Ubuntu link from 18.04 to 22.04
Vladimír Čunát [Fri, 5 Aug 2022 12:36:25 +0000 (14:36 +0200)] 
README.md: update Ubuntu link from 18.04 to 22.04

Other LTS than 22.04 have really old versions in the repo (<= 3.2.1),
so better not advertise those at all.

2 years agoREADME.md: add Repology badge
Jakub Jirutka [Thu, 4 Aug 2022 15:45:15 +0000 (17:45 +0200)] 
README.md: add Repology badge

2 years agoREADME.md: add Alpine Linux package to the list
Jakub Jirutka [Thu, 4 Aug 2022 15:44:27 +0000 (17:44 +0200)] 
README.md: add Alpine Linux package to the list

2 years agoMerge !1326: various nits
Vladimír Čunát [Mon, 8 Aug 2022 09:38:26 +0000 (11:38 +0200)] 
Merge !1326: various nits

3 years agodistro: drop tomas.krizek
Vladimír Čunát [Mon, 1 Aug 2022 12:32:52 +0000 (14:32 +0200)] 
distro: drop tomas.krizek

The address won't work anymore, and Jakub says this field isn't needed.

3 years agolib/utils: drop long unused parts
Vladimír Čunát [Fri, 1 Jul 2022 08:33:59 +0000 (10:33 +0200)] 
lib/utils: drop long unused parts

3 years agodrop unused #include lines
Vladimír Čunát [Fri, 1 Jul 2022 07:52:29 +0000 (09:52 +0200)] 
drop unused #include lines

3 years agomodules/dnstap nit: silence a lint:tidy warning
Vladimír Čunát [Wed, 1 Dec 2021 10:36:10 +0000 (11:36 +0100)] 
modules/dnstap nit: silence a lint:tidy warning

https://gitlab.nic.cz/knot/knot-resolver/-/jobs/635837#L219

3 years agoMerge !1325: ci/pkgtest: remove Ubuntu 21.10 obs-knot-resolver-es11k1/deployments/2211 obs-knot-resolver-es11k1/deployments/2212 obs-knot-resolver-es11k1/deployments/2213 obs-knot-resolver-es11k1/deployments/2214 obs-knot-resolver-es11k1/deployments/2215 obs-knot-resolver-es11k1/deployments/2216 obs-knot-resolver-es11k1/deployments/2217 obs-knot-resolver-es11k1/deployments/2218 obs-knot-resolver-es11k1/deployments/2219 obs-knot-resolver-es11k1/deployments/2220 obs-knot-resolver-es11k1/deployments/2221 obs-knot-resolver-es11k1/deployments/2222
Vladimír Čunát [Wed, 27 Jul 2022 09:36:11 +0000 (11:36 +0200)] 
Merge !1325: ci/pkgtest: remove Ubuntu 21.10

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 !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 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 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 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 !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 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 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 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 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 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 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