]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
13 months agoMerge !1564: master-5 branch into master docs-develop-mast-tzgd0f/deployments/4484 docs-develop-mast-tzgd0f/deployments/4485 docs-develop-mast-tzgd0f/deployments/4487 docs-develop-mast-tzgd0f/deployments/4490 docs-develop-mast-tzgd0f/deployments/4493 docs-develop-mast-tzgd0f/deployments/4509 docs-develop-mast-tzgd0f/deployments/4512 docs-develop-mast-tzgd0f/deployments/4519 docs-develop-mast-tzgd0f/deployments/4522 docs-develop-nigh-589znp/deployments/4486 docs-develop-nigh-589znp/deployments/4491 docs-develop-nigh-589znp/deployments/4510 docs-develop-nigh-589znp/deployments/4520 obs-knot-resolver-es11k1/deployments/4488 obs-knot-resolver-es11k1/deployments/4492 obs-knot-resolver-es11k1/deployments/4511 obs-knot-resolver-es11k1/deployments/4521
Vladimír Čunát [Sun, 7 Jul 2024 07:23:08 +0000 (09:23 +0200)] 
Merge !1564: master-5 branch into master

13 months agoMerge remote-tracking branch 'origin/master-5' into master docs-develop-merg-ecf55w/deployments/4466
Oto Šťáva [Wed, 3 Jul 2024 11:04:19 +0000 (13:04 +0200)] 
Merge remote-tracking branch 'origin/master-5' into master

13 months agoMerge branch 'separate-policy-kresd' into 'master' docs-develop-mast-tzgd0f/deployments/4454 docs-develop-mast-tzgd0f/deployments/4457 docs-develop-mast-tzgd0f/deployments/4460 docs-develop-mast-tzgd0f/deployments/4467 docs-develop-mast-tzgd0f/deployments/4470 docs-develop-mast-tzgd0f/deployments/4472 docs-develop-mast-tzgd0f/deployments/4475 docs-develop-mast-tzgd0f/deployments/4476 docs-develop-mast-tzgd0f/deployments/4479 docs-develop-mast-tzgd0f/deployments/4480 docs-develop-mast-tzgd0f/deployments/4483 docs-develop-nigh-589znp/deployments/4458 docs-develop-nigh-589znp/deployments/4468 docs-develop-nigh-589znp/deployments/4473 docs-develop-nigh-589znp/deployments/4477 docs-develop-nigh-589znp/deployments/4481 obs-knot-resolver-es11k1/deployments/4459 obs-knot-resolver-es11k1/deployments/4469 obs-knot-resolver-es11k1/deployments/4474 obs-knot-resolver-es11k1/deployments/4478 obs-knot-resolver-es11k1/deployments/4482
Aleš Mrázek [Tue, 2 Jul 2024 13:12:51 +0000 (15:12 +0200)] 
Merge branch 'separate-policy-kresd' into 'master'

manager: policy-loader: new process for loading policy rules separately

See merge request knot/knot-resolver!1540

13 months agomanager: fixed error message for 'max-workers' change denial docs-develop-sepa-lghkrh/deployments/4453
Aleš Mrázek [Thu, 27 Jun 2024 13:23:02 +0000 (15:23 +0200)] 
manager: fixed error message for 'max-workers' change denial

13 months agomanager: reset the workers policy rules only when necessary
Aleš Mrázek [Thu, 27 Jun 2024 13:18:45 +0000 (15:18 +0200)] 
manager: reset the workers policy rules only when necessary

Basically, the reset is necessary when only the policy rules have changed and there is no need to update the workers config.

13 months agomanager: loading policy rules is now done in the verifier callback
Aleš Mrázek [Thu, 27 Jun 2024 13:08:18 +0000 (15:08 +0200)] 
manager: loading policy rules is now done in the verifier callback

The main reason for this is to load the policies before the canary worker starts, making it a prerequisite for starting the workers.

13 months agomanager: load policy rules on any configuration change
Aleš Mrázek [Fri, 21 Jun 2024 11:42:27 +0000 (13:42 +0200)] 
manager: load policy rules on any configuration change

13 months agomanager: config_store: only_on_real_changes renamed to only_on_real_changes_update
Aleš Mrázek [Wed, 5 Jun 2024 15:40:16 +0000 (17:40 +0200)] 
manager: config_store: only_on_real_changes renamed to only_on_real_changes_update

13 months agomanager: start canary process only on real changes
Aleš Mrázek [Wed, 5 Jun 2024 15:22:44 +0000 (17:22 +0200)] 
manager: start canary process only on real changes

13 months agomanager: config_store: only on real changes decorator for verifiers
Aleš Mrázek [Wed, 5 Jun 2024 14:59:11 +0000 (16:59 +0200)] 
manager: config_store: only on real changes decorator for verifiers

13 months agomanager: controller: sd_notify: handle 'STOPPING=1' notification
Aleš Mrázek [Mon, 3 Jun 2024 16:52:25 +0000 (18:52 +0200)] 
manager: controller: sd_notify: handle 'STOPPING=1' notification

13 months agomanager: wait for 'policy-loader' to finish on the resolver startup
Aleš Mrázek [Fri, 17 May 2024 13:09:44 +0000 (15:09 +0200)] 
manager: wait for 'policy-loader' to finish on the resolver startup

When starting the resolver, we wait for policy-loader until policy rules are successfully loaded into the cache where the rules are shared between kred workers. After that, other processes are started. Otherwise, the workers might start without the configured rules in the cache while they are already resolving DNS traffic.

13 months agomanager: controller: getting SubprocessStatus from particular Subprocess
Aleš Mrázek [Fri, 17 May 2024 12:03:45 +0000 (14:03 +0200)] 
manager: controller: getting SubprocessStatus from particular Subprocess

13 months agodatamodel: types: IPNetwork: __eq__ added
Aleš Mrázek [Wed, 15 May 2024 15:07:08 +0000 (17:07 +0200)] 
datamodel: types: IPNetwork: __eq__ added

13 months agolib/rules: tweak how the read-only transactions work
Vladimír Čunát [Tue, 14 May 2024 09:03:59 +0000 (11:03 +0200)] 
lib/rules: tweak how the read-only transactions work

Let's avoid reloading the RO transaction unless necessary.
For example, when normal config reload happens (one kresd at a time),
we most likely do *not* want to reload the rule DB prematurely.

13 months agodoc/dev: architecture update and improvements
Aleš Mrázek [Mon, 13 May 2024 11:17:15 +0000 (13:17 +0200)] 
doc/dev: architecture update and improvements

13 months agodoc: architecture schemas improvements
Aleš Mrázek [Mon, 13 May 2024 09:50:02 +0000 (11:50 +0200)] 
doc: architecture schemas improvements

13 months agoNEWS: update about policy-loader
Aleš Mrázek [Fri, 10 May 2024 13:21:54 +0000 (15:21 +0200)] 
NEWS: update about policy-loader

13 months agomanager: controller: SubprocessStatus.EXITED added
Aleš Mrázek [Thu, 9 May 2024 13:28:17 +0000 (15:28 +0200)] 
manager: controller: SubprocessStatus.EXITED added

13 months agomanager: apply policy config separately
Aleš Mrázek [Fri, 26 Apr 2024 12:33:05 +0000 (14:33 +0200)] 
manager: apply policy config separately

13 months agomanager: controller: policy-loader program added
Aleš Mrázek [Tue, 12 Mar 2024 14:50:10 +0000 (15:50 +0100)] 
manager: controller: policy-loader program added

13 months agomanager: controller: new SubprocessType for loading policy added
Aleš Mrázek [Mon, 11 Mar 2024 13:24:22 +0000 (14:24 +0100)] 
manager: controller: new SubprocessType for loading policy added

13 months agodatamodel: templates: don't clear policy DB in kresd workers
Vladimír Čunát [Mon, 11 Mar 2024 07:58:13 +0000 (08:58 +0100)] 
datamodel: templates: don't clear policy DB in kresd workers

13 months agolib/rules kr_rules_init(): allow not overwriting the DB
Vladimír Čunát [Mon, 11 Mar 2024 07:09:38 +0000 (08:09 +0100)] 
lib/rules kr_rules_init(): allow not overwriting the DB

13 months agodatamodel: check for unused tags during config validation
Aleš Mrázek [Mon, 26 Feb 2024 23:17:57 +0000 (00:17 +0100)] 
datamodel: check for unused tags during config validation

13 months agodatamodel: templates: policy config moved out of the kresd worker config
Aleš Mrázek [Thu, 22 Feb 2024 13:40:27 +0000 (14:40 +0100)] 
datamodel: templates: policy config moved out of the kresd worker config

13 months agoMerge branch 'tls-client-error-log' into 'master-5' docs-develop-mast-tyrtta/deployments/4421
Oto Šťáva [Wed, 26 Jun 2024 12:00:22 +0000 (14:00 +0200)] 
Merge branch 'tls-client-error-log' into 'master-5'

daemon/tls: print IP when failing certificate check

See merge request knot/knot-resolver!1560

13 months agoMerge branch 'protolayer-constructors' into 'master' docs-develop-mast-tzgd0f/deployments/4390 docs-develop-mast-tzgd0f/deployments/4392 docs-develop-mast-tzgd0f/deployments/4395 docs-develop-mast-tzgd0f/deployments/4397 docs-develop-mast-tzgd0f/deployments/4399 docs-develop-mast-tzgd0f/deployments/4401 docs-develop-mast-tzgd0f/deployments/4404 docs-develop-mast-tzgd0f/deployments/4405 docs-develop-mast-tzgd0f/deployments/4407 docs-develop-mast-tzgd0f/deployments/4409 docs-develop-mast-tzgd0f/deployments/4412 docs-develop-mast-tzgd0f/deployments/4414 docs-develop-mast-tzgd0f/deployments/4417 docs-develop-mast-tzgd0f/deployments/4425 docs-develop-mast-tzgd0f/deployments/4428 docs-develop-mast-tzgd0f/deployments/4433 docs-develop-mast-tzgd0f/deployments/4436 docs-develop-mast-tzgd0f/deployments/4437 docs-develop-mast-tzgd0f/deployments/4440 docs-develop-mast-tzgd0f/deployments/4441 docs-develop-mast-tzgd0f/deployments/4444 docs-develop-mast-tzgd0f/deployments/4445 docs-develop-mast-tzgd0f/deployments/4448 docs-develop-mast-tzgd0f/deployments/4449 docs-develop-mast-tzgd0f/deployments/4452 docs-develop-nigh-589znp/deployments/4393 docs-develop-nigh-589znp/deployments/4398 docs-develop-nigh-589znp/deployments/4402 docs-develop-nigh-589znp/deployments/4406 docs-develop-nigh-589znp/deployments/4410 docs-develop-nigh-589znp/deployments/4415 docs-develop-nigh-589znp/deployments/4426 docs-develop-nigh-589znp/deployments/4434 docs-develop-nigh-589znp/deployments/4438 docs-develop-nigh-589znp/deployments/4442 docs-develop-nigh-589znp/deployments/4446 docs-develop-nigh-589znp/deployments/4450 obs-knot-resolver-es11k1/deployments/4394 obs-knot-resolver-es11k1/deployments/4400 obs-knot-resolver-es11k1/deployments/4403 obs-knot-resolver-es11k1/deployments/4408 obs-knot-resolver-es11k1/deployments/4411 obs-knot-resolver-es11k1/deployments/4416 obs-knot-resolver-es11k1/deployments/4427 obs-knot-resolver-es11k1/deployments/4435 obs-knot-resolver-es11k1/deployments/4439 obs-knot-resolver-es11k1/deployments/4443 obs-knot-resolver-es11k1/deployments/4447 obs-knot-resolver-es11k1/deployments/4451
Oto Šťáva [Thu, 20 Jun 2024 08:36:52 +0000 (10:36 +0200)] 
Merge branch 'protolayer-constructors' into 'master'

daemon: use __attribute__((constructor)) for protolayer_globals

See merge request knot/knot-resolver!1559

13 months agodaemon/tls: print IP when failing certificate check docs-develop-tls-2swicg/deployments/4381
Vladimír Čunát [Tue, 18 Jun 2024 17:20:44 +0000 (19:20 +0200)] 
daemon/tls: print IP when failing certificate check

13 months agodaemon: use __attribute__((constructor)) for protolayer_globals docs-develop-prot-614eod/deployments/4380
Oto Šťáva [Tue, 18 Jun 2024 15:18:37 +0000 (17:18 +0200)] 
daemon: use __attribute__((constructor)) for protolayer_globals

The `protolayer_globals` array can basically be treated as a constant by
most of the program and its initialization only uses compile-time-known
values.  We basically only initialize parts of the array in different
files throughout the codebase to maintain separation of concerns, so
that each piece of Knot Resolver initializes the part that pertains to
it.  Therefore, I believe that it is more ergonomic to just use
`__attribute__((constructor))` for these functions, so as not to pollute
`daemon/main.c` with these calls.

13 months agoMerge branch 'manager-dir-cleaning' into 'master' docs-develop-mast-tzgd0f/deployments/4378 docs-develop-mast-tzgd0f/deployments/4382 docs-develop-mast-tzgd0f/deployments/4385 docs-develop-mast-tzgd0f/deployments/4386 docs-develop-mast-tzgd0f/deployments/4389 docs-develop-nigh-589znp/deployments/4383 docs-develop-nigh-589znp/deployments/4387 obs-knot-resolver-es11k1/deployments/4384 obs-knot-resolver-es11k1/deployments/4388
Oto Šťáva [Tue, 18 Jun 2024 09:23:58 +0000 (11:23 +0200)] 
Merge branch 'manager-dir-cleaning' into 'master'

manager: directory cleaning

See merge request knot/knot-resolver!1557

13 months agodoc: slight reorganization and consistency adjustments docs-develop-mana-lwqjyh/deployments/4377
Oto Šťáva [Tue, 18 Jun 2024 08:59:08 +0000 (10:59 +0200)] 
doc: slight reorganization and consistency adjustments

13 months agomanager/README.md: dev info moved to doc docs-develop-mana-lwqjyh/deployments/4370
Aleš Mrázek [Mon, 17 Jun 2024 11:17:26 +0000 (13:17 +0200)] 
manager/README.md: dev info moved to doc

13 months agodoc/dev: development guides chapter created
Aleš Mrázek [Fri, 14 Jun 2024 13:36:10 +0000 (15:36 +0200)] 
doc/dev: development guides chapter created

Added information about the development environment and code structure.

14 months agomanager: tests: unused integration tests removed docs-develop-mana-lwqjyh/deployments/4347
Aleš Mrázek [Thu, 13 Jun 2024 04:12:39 +0000 (06:12 +0200)] 
manager: tests: unused integration tests removed

14 months agomanager: scripts: unused and non-functional scripts removed
Aleš Mrázek [Thu, 13 Jun 2024 04:09:33 +0000 (06:09 +0200)] 
manager: scripts: unused and non-functional scripts removed

14 months agomanager/pyproject.toml: unused and non-functional tasks removed
Aleš Mrázek [Thu, 13 Jun 2024 04:07:10 +0000 (06:07 +0200)] 
manager/pyproject.toml: unused and non-functional tasks removed

14 months agoMerge branch 'pkg-v6-cleanup' into 'master' docs-develop-mast-tzgd0f/deployments/4340 docs-develop-mast-tzgd0f/deployments/4343 docs-develop-mast-tzgd0f/deployments/4346 docs-develop-mast-tzgd0f/deployments/4348 docs-develop-mast-tzgd0f/deployments/4351 docs-develop-mast-tzgd0f/deployments/4357 docs-develop-mast-tzgd0f/deployments/4360 docs-develop-mast-tzgd0f/deployments/4361 docs-develop-mast-tzgd0f/deployments/4364 docs-develop-mast-tzgd0f/deployments/4365 docs-develop-mast-tzgd0f/deployments/4368 docs-develop-mast-tzgd0f/deployments/4371 docs-develop-mast-tzgd0f/deployments/4374 docs-develop-nigh-589znp/deployments/4344 docs-develop-nigh-589znp/deployments/4349 docs-develop-nigh-589znp/deployments/4358 docs-develop-nigh-589znp/deployments/4362 docs-develop-nigh-589znp/deployments/4366 docs-develop-nigh-589znp/deployments/4372 obs-knot-resolver-es11k1/deployments/4345 obs-knot-resolver-es11k1/deployments/4350 obs-knot-resolver-es11k1/deployments/4359 obs-knot-resolver-es11k1/deployments/4363 obs-knot-resolver-es11k1/deployments/4367 obs-knot-resolver-es11k1/deployments/4373
Jakub Ružička [Wed, 12 Jun 2024 11:26:44 +0000 (13:26 +0200)] 
Merge branch 'pkg-v6-cleanup' into 'master'

Debian packaging cleanup

See merge request knot/knot-resolver!1555

14 months agoMerge branch 'ksk-2024' into 'master-5' docs-develop-mast-tyrtta/deployments/4339
Oto Šťáva [Wed, 12 Jun 2024 07:46:46 +0000 (09:46 +0200)] 
Merge branch 'ksk-2024' into 'master-5'

etc/: add the fresh DNSSEC root key "KSK-2024" already

See merge request knot/knot-resolver!1556

14 months agodistro/pkg/deb: remove undefined shlib:Depends docs-develop-pkg-jbbndk/deployments/4334
Jakub Ružička [Tue, 11 Jun 2024 16:19:39 +0000 (18:19 +0200)] 
distro/pkg/deb: remove undefined shlib:Depends

This addresses dpkg-gencontrol warnings:

    dpkg-gencontrol: warning: Depends field of package knot-resolver6-module-http: substitution variable ${shlibs:Depends} used, but is not defined
    dpkg-gencontrol: warning: Depends field of package knot-resolver6-dev: substitution variable ${shlibs:Depends} used, but is not defined

14 months agodistro/pkg/deb: run `wrap-and-sort -bast` for git friendlier formatting docs-develop-pkg-jbbndk/deployments/4333
Jakub Ružička [Thu, 6 Jun 2024 15:04:24 +0000 (17:04 +0200)] 
distro/pkg/deb: run `wrap-and-sort -bast` for git friendlier formatting

14 months agodistro/pkg/deb: add README.md to docs
Jakub Ružička [Thu, 6 Jun 2024 14:54:45 +0000 (16:54 +0200)] 
distro/pkg/deb: add README.md to docs

14 months agodistro/pkg/deb: harmonize file paths in debhelper files
Jakub Ružička [Thu, 6 Jun 2024 14:52:44 +0000 (16:52 +0200)] 
distro/pkg/deb: harmonize file paths in debhelper files

14 months agodistro/pkg/deb: add Rules-Requires-Root: no
Jakub Ružička [Thu, 6 Jun 2024 14:50:26 +0000 (16:50 +0200)] 
distro/pkg/deb: add Rules-Requires-Root: no

14 months agodistro/pkg/deb: remove obsolete -dbg package
Jakub Ružička [Thu, 6 Jun 2024 14:50:26 +0000 (16:50 +0200)] 
distro/pkg/deb: remove obsolete -dbg package

-dbgsym packages are now generated automatically.

14 months agodistro/pkg/deb: improve HTTP module deps
Jakub Ružička [Thu, 6 Jun 2024 14:50:26 +0000 (16:50 +0200)] 
distro/pkg/deb: improve HTTP module deps

fixes lintian warning: not-binnmuable-all-depends-any

14 months agodistro/pkg/deb: add missing Standards-Version to d/control
Jakub Ružička [Thu, 6 Jun 2024 14:50:26 +0000 (16:50 +0200)] 
distro/pkg/deb: add missing Standards-Version to d/control

14 months agodistro/pkg/deb: silence irrelevant lintian warnings
Jakub Ružička [Thu, 6 Jun 2024 14:50:26 +0000 (16:50 +0200)] 
distro/pkg/deb: silence irrelevant lintian warnings

14 months agodistro/pkg/deb: update debian/copyright entries
Jakub Ružička [Thu, 6 Jun 2024 14:48:53 +0000 (16:48 +0200)] 
distro/pkg/deb: update debian/copyright entries

14 months agodistro/pkg/deb: fix incorrect formatting
Jakub Ružička [Thu, 6 Jun 2024 14:48:53 +0000 (16:48 +0200)] 
distro/pkg/deb: fix incorrect formatting

14 months agoetc/: add the fresh DNSSEC root key "KSK-2024" already docs-develop-ksk-qmeiye/deployments/4323
Vladimír Čunát [Mon, 10 Jun 2024 14:05:41 +0000 (16:05 +0200)] 
etc/: add the fresh DNSSEC root key "KSK-2024" already

The key still won't be used for some time, two years maybe,
but I think it's better to preemptively trust it already.
(outdated machines, etc.)

Some evidence that it's not just a hash of *my* private key:
https://www.iana.org/dnssec/ceremonies/53-2
https://data.iana.org/ksk-ceremony/53-2/kskm-keymaster-20240426-173035-995.log
https://www.youtube.com/live/gw4PFhtnVpk?si=C8zevM3nG9O0XAJr&t=12726

14 months agoMerge branch 'manager-ci-image' into 'master' docs-develop-mast-tzgd0f/deployments/4308 docs-develop-mast-tzgd0f/deployments/4310 docs-develop-mast-tzgd0f/deployments/4313 docs-develop-mast-tzgd0f/deployments/4314 docs-develop-mast-tzgd0f/deployments/4317 docs-develop-mast-tzgd0f/deployments/4318 docs-develop-mast-tzgd0f/deployments/4321 docs-develop-mast-tzgd0f/deployments/4325 docs-develop-mast-tzgd0f/deployments/4328 docs-develop-mast-tzgd0f/deployments/4335 docs-develop-mast-tzgd0f/deployments/4338 docs-develop-nigh-589znp/deployments/4311 docs-develop-nigh-589znp/deployments/4315 docs-develop-nigh-589znp/deployments/4319 docs-develop-nigh-589znp/deployments/4326 docs-develop-nigh-589znp/deployments/4336 obs-knot-resolver-es11k1/deployments/4312 obs-knot-resolver-es11k1/deployments/4316 obs-knot-resolver-es11k1/deployments/4320 obs-knot-resolver-es11k1/deployments/4327 obs-knot-resolver-es11k1/deployments/4337
Oto Šťáva [Fri, 7 Jun 2024 12:01:57 +0000 (14:01 +0200)] 
Merge branch 'manager-ci-image' into 'master'

manager: use image from 'knot-resolver-ci'

See merge request knot/knot-resolver!1554

14 months agomanager/pyproject.toml: update Poetry docs-develop-mana-yuftw6/deployments/4300
Oto Šťáva [Thu, 6 Jun 2024 12:30:40 +0000 (14:30 +0200)] 
manager/pyproject.toml: update Poetry

14 months agomanager: use image from 'knot-resolver-ci'
Oto Šťáva [Wed, 5 Jun 2024 18:06:33 +0000 (20:06 +0200)] 
manager: use image from 'knot-resolver-ci'

This was forgotten during the CI overhaul.

14 months agoMerge branch 'remove-libedit' into 'master' docs-develop-mast-tzgd0f/deployments/4294 docs-develop-mast-tzgd0f/deployments/4303 docs-develop-mast-tzgd0f/deployments/4306 docs-develop-nigh-589znp/deployments/4304 obs-knot-resolver-es11k1/deployments/4305
Oto Šťáva [Thu, 6 Jun 2024 10:59:17 +0000 (12:59 +0200)] 
Merge branch 'remove-libedit' into 'master'

Remove unused dependency and Dockerfile

See merge request knot/knot-resolver!1553

14 months agoci/images/debian-12: remove docs-develop-remo-elu6lh/deployments/4283
Oto Šťáva [Wed, 5 Jun 2024 12:36:43 +0000 (14:36 +0200)] 
ci/images/debian-12: remove

Remnant of the past. This has been since replaced by images from
the `knot-resolver-ci` repo.

14 months agodistro/pkg: remove dependency on libedit
Oto Šťáva [Wed, 5 Jun 2024 12:35:23 +0000 (14:35 +0200)] 
distro/pkg: remove dependency on libedit

The library was used by the old experimental `kresc` client, which has
been removed in favour of Manager's `kresctl`.

14 months agoMerge branch 'nits-warnings' into 'master-5' docs-develop-mast-tyrtta/deployments/4281
Oto Šťáva [Wed, 5 Jun 2024 10:47:31 +0000 (12:47 +0200)] 
Merge branch 'nits-warnings' into 'master-5'

reduce build-time warnings

See merge request knot/knot-resolver!1552

14 months ago**/meson.build: avoid deprecations in meson >= 1.4 docs-develop-nits-11ie7m/deployments/4279
Vladimír Čunát [Wed, 5 Jun 2024 07:59:30 +0000 (09:59 +0200)] 
**/meson.build: avoid deprecations in meson >= 1.4

The code isn't pretty, but probably better than watching
the fat red lines on every build.

14 months agomeson.build: avoid a gcc 14 warning
Vladimír Čunát [Wed, 5 Jun 2024 07:58:18 +0000 (09:58 +0200)] 
meson.build: avoid a gcc 14 warning

Picked from master commit 68688fac013a4c16a476acc15c366a8ce07ed46e

14 months agoMerge branch 'nits' into 'master' docs-develop-mast-tzgd0f/deployments/4273 docs-develop-mast-tzgd0f/deployments/4275 docs-develop-mast-tzgd0f/deployments/4278 docs-develop-mast-tzgd0f/deployments/4289 docs-develop-mast-tzgd0f/deployments/4292 docs-develop-nigh-589znp/deployments/4276 docs-develop-nigh-589znp/deployments/4290 obs-knot-resolver-es11k1/deployments/4277 obs-knot-resolver-es11k1/deployments/4291
Oto Šťáva [Tue, 4 Jun 2024 15:32:01 +0000 (17:32 +0200)] 
Merge branch 'nits' into 'master'

Protocol layers and other parts refactoring (+ nits)

See merge request knot/knot-resolver!1546

14 months agodaemon/session2.h: clarify `struct session2` docs docs-develop-nits-2dntdj/deployments/4272
Oto Šťáva [Tue, 4 Jun 2024 08:49:49 +0000 (10:49 +0200)] 
daemon/session2.h: clarify `struct session2` docs

As pointed out by @lukas.ondracek, the wording could be confusing when
mentioning *bottommost* and *topmost* layers. The original wording was
meant to reference the way the arrays in `daemon/session2.c` are laid
out, but never explicitly mentioned that, so one could be implicitly
think it was in reference to the widely known ISO/OSI or TCP/IP models,
which could be interpreted incorrectly (the layers are traditionally
laid out the other way around there).

14 months ago.gitlab-ci: use Arch for linting
Oto Šťáva [Fri, 31 May 2024 13:04:25 +0000 (15:04 +0200)] 
.gitlab-ci: use Arch for linting

This allows us to use the newest versions of linter tools.

14 months agodaemon/session2: fix asynchronous layer iterations
Oto Šťáva [Fri, 31 May 2024 10:09:42 +0000 (12:09 +0200)] 
daemon/session2: fix asynchronous layer iterations

There were a few bugs in the protolayer system that prevented us from
pausing iteration and resuming it properly. This commit should hopefully
resolve them.

14 months agoSome more Clang-Tidy silencing
Oto Šťáva [Wed, 29 May 2024 14:04:45 +0000 (16:04 +0200)] 
Some more Clang-Tidy silencing

14 months agodaemon/session2: optimize allocations
Oto Šťáva [Wed, 22 May 2024 13:18:30 +0000 (15:18 +0200)] 
daemon/session2: optimize allocations

A) Context-specific allocations
-------------------------------

There were two problems:

1) Some payloads are short-lived (e.g. allocated on stack) and we need
   to make a copy of them if the iteration over protocol layers becomes
   asynchronous.
2) The `pl_dns_stream_wrap` function used a mempool belonging to its
   session-wide context. Some sessions may live for a long time, which
   could potentially lead to needlessly long-lived memory allocations.

Both of these problems are solved in this commit by using a new
`knot_mm_t pool` field in `struct protolayer_iter_ctx`, which lives only
for a single submit (and survives asynchronicity). The whole pool is
then freed all at once when the `struct protolayer_iter_ctx` is
finalized.

B) Merging `struct protolayer_manager` into `struct session2`
-------------------------------------------------------------

It actually made no real sense to have the two separated. It only
introduced an extra layer of indirection and many layers actually needed
to access both anyway. This should simplify things considerably.

14 months agodaemon/proxyv2: move PROXY protocol into its own layer
Oto Šťáva [Tue, 21 May 2024 17:04:38 +0000 (19:04 +0200)] 
daemon/proxyv2: move PROXY protocol into its own layer

Previously, PROXYv2 handling was partially implemented in the `io.c`
unit in the `_TCP` and `_UDP` protocol layers, which technically made
very little sense. This commit moves this handling into separate
`_PROXYV2_DGRAM` and `_PROXYV2_STREAM` protocol layers, basically
encapsulating the handling of proxies in the `proxyv2.c` unit.

This commit also makes the PROXYv2 stream layer only support
`PROTOLAYER_PAYLOAD_WIRE_BUF` on its input, as other payload types were
unused and untested in this context.

14 months agodaemon/session2: protocol layer refactors + docs
Oto Šťáva [Tue, 21 May 2024 16:38:56 +0000 (18:38 +0200)] 
daemon/session2: protocol layer refactors + docs

This makes some readability enhancements to the `protolayer_` API as
well as clarifies some of the documentation.

There is also a change where the definitions of protocol layer sequences
does not require a `_NULL` layer to be present at the end anymore, as
the number of layers in a sequence is determined at compile time. This
makes defining new sequences less error-prone.

14 months agodaemon, lib: unify protolayer_grp and kr_proto enums
Oto Šťáva [Tue, 21 May 2024 09:09:47 +0000 (11:09 +0200)] 
daemon, lib: unify protolayer_grp and kr_proto enums

14 months agodaemon/session2: documentation improvements
Oto Šťáva [Mon, 20 May 2024 16:42:38 +0000 (18:42 +0200)] 
daemon/session2: documentation improvements

14 months agodaemon/io: remove minor inefficiency
Oto Šťáva [Mon, 20 May 2024 16:22:19 +0000 (18:22 +0200)] 
daemon/io: remove minor inefficiency

The resolver would try to move the bytes in the wire buffer over even if
the incoming data would not fit anyway. This should prevent that.

14 months agodaemon/http: fix typo
Oto Šťáva [Mon, 20 May 2024 15:50:00 +0000 (17:50 +0200)] 
daemon/http: fix typo

A missing `protolayer_break()`. C's typechecking failed me.

14 months agoutils/client/.clang-tidy: remove
Oto Šťáva [Wed, 15 May 2024 14:04:21 +0000 (16:04 +0200)] 
utils/client/.clang-tidy: remove

This is a leftover from the merged CI/CD overhaul. Only relevant for
Knot Resolver 5 - in 6, the experimental client was removed in favour of
`kresctl` from `manager`.

14 months agoMerge branch 'manager-configurable-meson' into 'master' docs-develop-mast-tzgd0f/deployments/4269
Oto Šťáva [Tue, 4 Jun 2024 11:02:05 +0000 (13:02 +0200)] 
Merge branch 'manager-configurable-meson' into 'master'

manager: configurable Meson directory

See merge request knot/knot-resolver!1542

14 months agodoc/dev/build.rst: installing the manager from source docs-develop-mana-oa16bs/deployments/4265
Aleš Mrázek [Tue, 4 Jun 2024 04:48:21 +0000 (06:48 +0200)] 
doc/dev/build.rst: installing the manager from source

14 months agoMerge branch 'release-5.7.3' into 'master-5' docs-develop-mast-tyrtta/deployments/4227 docs-release-v5-7-74oxdd/deployments/4229 obs-knot-resolver-8xyvhu/deployments/4230 obs-knot-resolver-kv62s6/deployments/4228 v5.7.3
Aleš Mrázek [Thu, 30 May 2024 12:19:21 +0000 (14:19 +0200)] 
Merge branch 'release-5.7.3' into 'master-5'

Release 5.7.3

See merge request knot/knot-resolver!1551

14 months agorelease 5.7.3 docs-develop-rele-weu2f2/deployments/4224 docs-develop-rele-weu2f2/deployments/4226 obs-knot-resolver-bs4hbr/deployments/4225
Aleš Mrázek [Thu, 30 May 2024 11:15:35 +0000 (13:15 +0200)] 
release 5.7.3

14 months agoMerge branch 'nsec3-iters-wild' into 'master-5' docs-develop-mast-tyrtta/deployments/4223
Oto Šťáva [Thu, 30 May 2024 10:34:33 +0000 (12:34 +0200)] 
Merge branch 'nsec3-iters-wild' into 'master-5'

iterate: fix NSEC3 records missing from answer in an edge case

See merge request knot/knot-resolver!1550

14 months agomanager: configurable Meson directory docs-develop-mana-oa16bs/deployments/4217
Oto Šťáva [Thu, 16 May 2024 12:17:12 +0000 (14:17 +0200)] 
manager: configurable Meson directory

This commit makes it more convenient to change the configuration of the
build directory of `kresd` when using Knot Resolver Manager. It adds a
new `./poe configure` command, which optionally takes the same arguments
as the standard `meson configure` command.

The `./poe run` command now requires running `./poe configure` at least
once to set up the build directory. If the directory has been configured
before this commit (i.e. `./poe run` has been executed at least once),
no extra action is required, as the directory structure remains the
same.

The commit also removes the `manager` configuration option from Meson as
we were not using it and it was broken and potentially confusing to
newcomers.

14 months agoiterate: fix NSEC3 records missing from answer in an edge case docs-develop-nsec-3srvyj/deployments/4211
Vladimír Čunát [Wed, 29 May 2024 13:07:46 +0000 (15:07 +0200)] 
iterate: fix NSEC3 records missing from answer in an edge case

When positive wildcard expansion happens, NSEC(3) records are needed
to prove that the expansion was allowed.  If the NSEC3 had too many
iterations, we downgrade the answer to insecure status, but
unintentionally we also dropped the NSEC3 record from the answer.

That was breaking DNSSEC validation of that answer, e.g. when
forwarding to Knot Resolver.  The validator needs the NSEC3 -
either to validate the expansion or to determine that it's too expensive.

14 months agoMerge branch 'pkg-v6-update' into 'master' docs-develop-mast-tzgd0f/deployments/4207 docs-develop-mast-tzgd0f/deployments/4219 docs-develop-mast-tzgd0f/deployments/4222 docs-develop-mast-tzgd0f/deployments/4233 docs-develop-mast-tzgd0f/deployments/4236 docs-develop-mast-tzgd0f/deployments/4248 docs-develop-mast-tzgd0f/deployments/4251 docs-develop-mast-tzgd0f/deployments/4252 docs-develop-mast-tzgd0f/deployments/4255 docs-develop-mast-tzgd0f/deployments/4256 docs-develop-mast-tzgd0f/deployments/4259 docs-develop-mast-tzgd0f/deployments/4261 docs-develop-mast-tzgd0f/deployments/4264 docs-develop-nigh-589znp/deployments/4220 docs-develop-nigh-589znp/deployments/4234 docs-develop-nigh-589znp/deployments/4249 docs-develop-nigh-589znp/deployments/4253 docs-develop-nigh-589znp/deployments/4257 docs-develop-nigh-589znp/deployments/4262 obs-knot-resolver-es11k1/deployments/4221 obs-knot-resolver-es11k1/deployments/4235 obs-knot-resolver-es11k1/deployments/4250 obs-knot-resolver-es11k1/deployments/4254 obs-knot-resolver-es11k1/deployments/4258 obs-knot-resolver-es11k1/deployments/4263
Oto Šťáva [Wed, 29 May 2024 10:21:15 +0000 (12:21 +0200)] 
Merge branch 'pkg-v6-update' into 'master'

distro: merge -core and -manager into knot-resolver

See merge request knot/knot-resolver!1549

14 months agodistro/config: bump apkg compat level to latest docs-develop-pkg-69bht2/deployments/4206
Jakub Ružička [Tue, 28 May 2024 13:28:05 +0000 (15:28 +0200)] 
distro/config: bump apkg compat level to latest

No changes required.

14 months agodistro/pkg/rpm: merge -core and -manager into knot-resolver
Jakub Ružička [Tue, 28 May 2024 12:41:51 +0000 (14:41 +0200)] 
distro/pkg/rpm: merge -core and -manager into knot-resolver

14 months agodistro/pkg/deb: add -dev package
Jakub Ružička [Fri, 24 May 2024 12:01:17 +0000 (14:01 +0200)] 
distro/pkg/deb: add -dev package

14 months agodistro/pkg/deb: use knot-resolver6 prefix
Jakub Ružička [Fri, 24 May 2024 11:52:52 +0000 (13:52 +0200)] 
distro/pkg/deb: use knot-resolver6 prefix

Prevent accidental upgrades from v5.

Merge -core and -manager subpackages back into knot-resolver6.

14 months agoMerge branch 'dnsssec-false' into 'master' docs-develop-mast-tzgd0f/deployments/4195 docs-develop-mast-tzgd0f/deployments/4202 docs-develop-mast-tzgd0f/deployments/4205 docs-develop-nigh-589znp/deployments/4203 obs-knot-resolver-es11k1/deployments/4204
Aleš Mrázek [Tue, 28 May 2024 08:40:47 +0000 (10:40 +0200)] 
Merge branch 'dnsssec-false' into 'master'

datamodel: unbreak `dnssec: false`

See merge request knot/knot-resolver!1548

14 months agodatamodel: unbreak `dnssec: false` docs-develop-dnss-peq4j3/deployments/4194
Vladimír Čunát [Mon, 27 May 2024 08:57:58 +0000 (10:57 +0200)] 
datamodel: unbreak `dnssec: false`

It was causing an incorrect Lua line
  trust_anchors.keep_removed =

Reported on gitter a couple days ago.

14 months agoMerge branch 'stats-split-6.x' into 'master' docs-develop-mast-tzgd0f/deployments/4186 docs-develop-mast-tzgd0f/deployments/4190 docs-develop-mast-tzgd0f/deployments/4193 docs-develop-nigh-589znp/deployments/4191 obs-knot-resolver-es11k1/deployments/4192
Oto Šťáva [Mon, 27 May 2024 11:49:15 +0000 (13:49 +0200)] 
Merge branch 'stats-split-6.x' into 'master'

modules/stats: split IPv4 and IPv6 stats (version 6.x)

See merge request knot/knot-resolver!1545

14 months agoNon-trivial merge 'master-5' (see 'modules/stats') docs-develop-stat-s8hiue/deployments/4185
Oto Šťáva [Mon, 27 May 2024 10:59:51 +0000 (12:59 +0200)] 
Non-trivial merge 'master-5' (see 'modules/stats')

modules/stats: adapt aggregate stats to the new hierarchical format

Knot Resolver 6 changed the structure of the stats return value, making
it more hierarchical, i.e. the returned object contains nested
"sub-objects", rather than being flat. This commit adapts the new
aggregate stats to this new structure, for consistency.

14 months agoMerge !1544: modules/stats: split IPv4 and IPv6 stats (version 5.x) docs-develop-mast-tyrtta/deployments/4182
Vladimír Čunát [Mon, 27 May 2024 10:17:42 +0000 (12:17 +0200)] 
Merge !1544: modules/stats: split IPv4 and IPv6 stats (version 5.x)

14 months agoNEWS: stats split docs-develop-stat-ik6qmx/deployments/4181
Oto Šťáva [Mon, 27 May 2024 09:18:34 +0000 (11:18 +0200)] 
NEWS: stats split

14 months agomodules/stats: add back stats dropped in the previous commit docs-develop-stat-ik6qmx/deployments/4128
Vladimír Čunát [Mon, 20 May 2024 12:11:07 +0000 (14:11 +0200)] 
modules/stats: add back stats dropped in the previous commit

Just as read-only aggregates of the split v4+v6 pairs.

14 months agomodules/stats: split request.* metrics to IPv4 and IPv6
Vladimír Čunát [Mon, 20 May 2024 11:32:52 +0000 (13:32 +0200)] 
modules/stats: split request.* metrics to IPv4 and IPv6

Let's have .total4 and .total6, too.  Then .total could be expressed
as a sum of *three* (including .internal), so it's still counted
separately, as an exception.

14 months agomodules/stats: add answer.sum_ms metric
Vladimír Čunát [Mon, 20 May 2024 11:32:45 +0000 (13:32 +0200)] 
modules/stats: add answer.sum_ms metric

(cherry picked from commit 44df5dd0d0fedfae390e7137572bcb14270e4d48)

14 months agoMerge branch 'coverity' into 'master-5' docs-develop-mast-tyrtta/deployments/4126
Oto Šťáva [Mon, 20 May 2024 11:01:04 +0000 (13:01 +0200)] 
Merge branch 'coverity' into 'master-5'

Coverity fixes

See merge request knot/knot-resolver!1543

14 months agodaemon/tls_ephemeral_credentials: fix possible race between read() and fstat() docs-develop-cove-uiak3c/deployments/4125
Oto Šťáva [Mon, 20 May 2024 09:52:27 +0000 (11:52 +0200)] 
daemon/tls_ephemeral_credentials: fix possible race between read() and fstat()

14 months ago.gitlab-ci: fail Coverity Scan on HTTP error
Oto Šťáva [Mon, 20 May 2024 09:01:19 +0000 (11:01 +0200)] 
.gitlab-ci: fail Coverity Scan on HTTP error

14 months agomodules/hints: fix dname bounds check
Oto Šťáva [Fri, 17 May 2024 11:22:51 +0000 (13:22 +0200)] 
modules/hints: fix dname bounds check

This check was introduced to fix Clang-Tidy errors, but was factually
not completely correct, tripping Coverity Scan.

14 months agoutils/cache_gc: use lib/generic/array instead of dynarray
Oto Šťáva [Fri, 17 May 2024 11:03:27 +0000 (13:03 +0200)] 
utils/cache_gc: use lib/generic/array instead of dynarray

This should appease Coverity Scan, and make the garbage collector
consistent with the rest of the Resolver.

14 months agoMerge branch 'coverity' into 'master' docs-develop-mast-tzgd0f/deployments/4084 docs-develop-mast-tzgd0f/deployments/4091 docs-develop-mast-tzgd0f/deployments/4094 docs-develop-mast-tzgd0f/deployments/4099 docs-develop-mast-tzgd0f/deployments/4102 docs-develop-mast-tzgd0f/deployments/4109 docs-develop-mast-tzgd0f/deployments/4112 docs-develop-mast-tzgd0f/deployments/4113 docs-develop-mast-tzgd0f/deployments/4116 docs-develop-mast-tzgd0f/deployments/4117 docs-develop-mast-tzgd0f/deployments/4120 docs-develop-mast-tzgd0f/deployments/4133 docs-develop-mast-tzgd0f/deployments/4136 docs-develop-mast-tzgd0f/deployments/4144 docs-develop-mast-tzgd0f/deployments/4147 docs-develop-mast-tzgd0f/deployments/4152 docs-develop-mast-tzgd0f/deployments/4154 docs-develop-mast-tzgd0f/deployments/4158 docs-develop-mast-tzgd0f/deployments/4161 docs-develop-mast-tzgd0f/deployments/4162 docs-develop-mast-tzgd0f/deployments/4165 docs-develop-mast-tzgd0f/deployments/4168 docs-develop-mast-tzgd0f/deployments/4171 docs-develop-mast-tzgd0f/deployments/4172 docs-develop-mast-tzgd0f/deployments/4175 docs-develop-nigh-589znp/deployments/4092 docs-develop-nigh-589znp/deployments/4100 docs-develop-nigh-589znp/deployments/4110 docs-develop-nigh-589znp/deployments/4114 docs-develop-nigh-589znp/deployments/4118 docs-develop-nigh-589znp/deployments/4134 docs-develop-nigh-589znp/deployments/4145 docs-develop-nigh-589znp/deployments/4153 docs-develop-nigh-589znp/deployments/4159 docs-develop-nigh-589znp/deployments/4163 docs-develop-nigh-589znp/deployments/4169 docs-develop-nigh-589znp/deployments/4173 obs-knot-resolver-es11k1/deployments/4093 obs-knot-resolver-es11k1/deployments/4101 obs-knot-resolver-es11k1/deployments/4111 obs-knot-resolver-es11k1/deployments/4115 obs-knot-resolver-es11k1/deployments/4119 obs-knot-resolver-es11k1/deployments/4135 obs-knot-resolver-es11k1/deployments/4146 obs-knot-resolver-es11k1/deployments/4155 obs-knot-resolver-es11k1/deployments/4160 obs-knot-resolver-es11k1/deployments/4164 obs-knot-resolver-es11k1/deployments/4170 obs-knot-resolver-es11k1/deployments/4174
Oto Šťáva [Wed, 15 May 2024 13:02:35 +0000 (15:02 +0200)] 
Merge branch 'coverity' into 'master'

daemon, lib, modules: trivial fixes for Coverity issues

See merge request knot/knot-resolver!1541