]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
2 years agomanager: ignore .egg-info directory
Oto Šťáva [Mon, 24 Jul 2023 08:15:20 +0000 (10:15 +0200)] 
manager: ignore .egg-info directory

2 years agomanager: add new Python versions
Oto Šťáva [Mon, 24 Jul 2023 08:14:57 +0000 (10:14 +0200)] 
manager: add new Python versions

2 years agomanager: replace mentions of Python 3.6 with 3.7
Oto Šťáva [Mon, 24 Jul 2023 07:40:57 +0000 (09:40 +0200)] 
manager: replace mentions of Python 3.6 with 3.7

Support for Python <3.7 has been dropped - mentions of 3.6 are therefore
outdated.

2 years agoMerge !1428: manager: config file can be also in JSON
Vladimír Čunát [Sun, 23 Jul 2023 13:50:59 +0000 (15:50 +0200)] 
Merge !1428: manager: config file can be also in JSON

2 years agomanager: config file can be also in JSON
Aleš Mrázek [Tue, 18 Jul 2023 11:44:15 +0000 (13:44 +0200)] 
manager: config file can be also in JSON

First try parsing as JSON, then as YAML.

2 years agoMerge !1426: manager: use .yaml suffix for config files
Vladimír Čunát [Sun, 23 Jul 2023 09:10:14 +0000 (11:10 +0200)] 
Merge !1426: manager: use .yaml suffix for config files

2 years agodoc: .yml -> .yaml
Vladimír Čunát [Sun, 23 Jul 2023 08:57:23 +0000 (10:57 +0200)] 
doc: .yml -> .yaml

At least in parts where it wouldn't conflict with other doc WIP.

2 years agomanager: use .yaml suffix for config files
Aleš Mrázek [Tue, 18 Jul 2023 08:17:03 +0000 (10:17 +0200)] 
manager: use .yaml suffix for config files

2 years agoMerge !1429: datamodel: local-data: render ttl and nodata
Vladimír Čunát [Wed, 19 Jul 2023 16:48:54 +0000 (18:48 +0200)] 
Merge !1429: datamodel: local-data: render ttl and nodata

2 years agodatamodel: local-data: render ttl and nodata
Aleš Mrázek [Wed, 19 Jul 2023 15:30:57 +0000 (17:30 +0200)] 
datamodel: local-data: render ttl and nodata

2 years agoMerge !1291: manager: datamodel: validate or escape strings in datamodel
Vladimír Čunát [Thu, 13 Jul 2023 08:38:42 +0000 (10:38 +0200)] 
Merge !1291: manager: datamodel: validate or escape strings in datamodel

2 years agomanager: datamodel: types: multiline method for EscapedStr
Aleš Mrázek [Fri, 23 Jun 2023 10:02:08 +0000 (12:02 +0200)] 
manager: datamodel: types: multiline method for EscapedStr

It escapes double square brackets.

2 years agomanager: datamodel: types: EscapedStr32B type
Aleš Mrázek [Tue, 20 Jun 2023 13:16:12 +0000 (15:16 +0200)] 
manager: datamodel: types: EscapedStr32B type

2 years agomanager: datamodel: 'str' type removed from schemas
Aleš Mrázek [Tue, 20 Jun 2023 12:52:54 +0000 (14:52 +0200)] 
manager: datamodel: 'str' type removed from schemas

2 years agomanager: datamodel: types: EscapedStr type
Aleš Mrázek [Tue, 20 Jun 2023 12:30:18 +0000 (14:30 +0200)] 
manager: datamodel: types: EscapedStr type

2 years agomanager: datamodel: types: StringLengthBase type
Aleš Mrázek [Tue, 20 Jun 2023 10:11:56 +0000 (12:11 +0200)] 
manager: datamodel: types: StringLengthBase type

2 years agomanager: datamodel: base types refactored
Aleš Mrázek [Tue, 20 Jun 2023 09:20:15 +0000 (11:20 +0200)] 
manager: datamodel: base types refactored

2 years agomanager: datamodel: types: PinSha256 custom type
Aleš Mrázek [Tue, 20 Jun 2023 08:37:50 +0000 (10:37 +0200)] 
manager: datamodel: types: PinSha256 custom type

2 years agomanager: tests: check that there is no 'str' in datamodel
Aleš Mrázek [Tue, 13 Jun 2023 15:26:27 +0000 (17:26 +0200)] 
manager: tests: check that there is no 'str' in datamodel

2 years agomanager: datamodel: types: hyphen added to IDPattern
Aleš Mrázek [Mon, 12 Jun 2023 10:06:01 +0000 (12:06 +0200)] 
manager: datamodel: types: hyphen added to IDPattern

2 years agoMerge !1421: doc/config-policy-new: add this section
Vladimír Čunát [Thu, 13 Jul 2023 06:53:05 +0000 (08:53 +0200)] 
Merge !1421: doc/config-policy-new: add this section

2 years agodoc/config-policy-new: add this section
Vladimír Čunát [Fri, 7 Jul 2023 14:30:22 +0000 (16:30 +0200)] 
doc/config-policy-new: add this section

This includes some reformulations and adjustments from ostava.

2 years agolib/rules kr_view_insert_action(): fix subnet truncation
Vladimír Čunát [Wed, 12 Jul 2023 14:24:44 +0000 (16:24 +0200)] 
lib/rules kr_view_insert_action(): fix subnet truncation

The rule DB keys were truncated by one byte.
Unfortunately that often kept them behaving OK so it went unnoticed;
but in particular any /0 views got ignored as a result.

2 years agoMerge !1423: distro/pkg/rpm: require setuptools on suse
Vladimír Čunát [Wed, 12 Jul 2023 08:35:25 +0000 (10:35 +0200)] 
Merge !1423: distro/pkg/rpm: require setuptools on suse

2 years agodistro/pkg/rpm: require setuptools on suse
Jakub Ružička [Tue, 11 Jul 2023 10:43:24 +0000 (12:43 +0200)] 
distro/pkg/rpm: require setuptools on suse

Otherwise:

Traceback (most recent call last):
  File "/builddir/build/BUILD/knot-resolver-6.0.1.dev90+5003e3/manager/setup.py", line 2, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'

2 years agodaemon/http nit: fix a warning
Vladimír Čunát [Tue, 11 Jul 2023 08:54:13 +0000 (10:54 +0200)] 
daemon/http nit: fix a warning

I was careless with the merge of master -> 6.0

2 years agofixup! Merge branch 'master' into 6.0
Vladimír Čunát [Tue, 11 Jul 2023 08:52:10 +0000 (10:52 +0200)] 
fixup! Merge branch 'master' into 6.0

2 years agoMerge branch 'master' into 6.0
Vladimír Čunát [Tue, 11 Jul 2023 08:17:57 +0000 (10:17 +0200)] 
Merge branch 'master' into 6.0

2 years agoMerge !1422: avoid knot_pkt_default_padding_size() obs-knot-resolver-es11k1/deployments/2590 obs-knot-resolver-es11k1/deployments/2591 obs-knot-resolver-es11k1/deployments/2592 obs-knot-resolver-es11k1/deployments/2593 obs-knot-resolver-es11k1/deployments/2594 obs-knot-resolver-es11k1/deployments/2595 obs-knot-resolver-es11k1/deployments/2596 obs-knot-resolver-es11k1/deployments/2597 obs-knot-resolver-es11k1/deployments/2598 obs-knot-resolver-es11k1/deployments/2599 obs-knot-resolver-es11k1/deployments/2600 obs-knot-resolver-es11k1/deployments/2601 obs-knot-resolver-es11k1/deployments/2602 obs-knot-resolver-es11k1/deployments/2603 obs-knot-resolver-es11k1/deployments/2604 obs-knot-resolver-es11k1/deployments/2605 obs-knot-resolver-es11k1/deployments/2606 obs-knot-resolver-es11k1/deployments/2607 obs-knot-resolver-es11k1/deployments/2608 obs-knot-resolver-es11k1/deployments/2609 obs-knot-resolver-es11k1/deployments/2610 obs-knot-resolver-es11k1/deployments/2611 obs-knot-resolver-es11k1/deployments/2612 obs-knot-resolver-es11k1/deployments/2613 obs-knot-resolver-es11k1/deployments/2614 obs-knot-resolver-es11k1/deployments/2615
Vladimír Čunát [Tue, 11 Jul 2023 08:13:26 +0000 (10:13 +0200)] 
Merge !1422: avoid knot_pkt_default_padding_size()

2 years agoMerge !1418: avoid 5.x style config and systemd units, by default
Vladimír Čunát [Tue, 11 Jul 2023 08:08:14 +0000 (10:08 +0200)] 
Merge !1418: avoid 5.x style config and systemd units, by default

2 years agodeprecate legacy systemd units
Vladimír Čunát [Wed, 28 Jun 2023 08:17:41 +0000 (10:17 +0200)] 
deprecate legacy systemd units

- separate meson option, disabled by default
- deb,rpm: don't install these legacy units
- deb,rpm: use the new knot-resolver.service on all the places

2 years agokresd.conf: don't install by default, drop from packages
Vladimír Čunát [Wed, 28 Jun 2023 07:51:06 +0000 (09:51 +0200)] 
kresd.conf: don't install by default, drop from packages

Installing a legacy lua config by default would be confusing.

2 years agoavoid knot_pkt_default_padding_size()
Vladimír Čunát [Wed, 28 Jun 2023 15:48:51 +0000 (17:48 +0200)] 
avoid knot_pkt_default_padding_size()

The reserved size in packet is a messy thing, broken by
https://gitlab.nic.cz/knot/knot-dns/-/commit/ded5fbf01d00a875f141
Fortunately this function is trivial, so we can inline what we need.
It gets complicated by an earlier typo fix, though.

2 years agoMerge !1419: manager: datamodel: missing options for dns64
Vladimír Čunát [Wed, 28 Jun 2023 16:24:00 +0000 (18:24 +0200)] 
Merge !1419: manager: datamodel: missing options for dns64

2 years agomanager: datamodel: missing options for dns64
Aleš Mrázek [Wed, 28 Jun 2023 13:35:38 +0000 (15:35 +0200)] 
manager: datamodel: missing options for dns64

2 years agoMerge !1409: kresc: remove this client
Vladimír Čunát [Wed, 28 Jun 2023 07:38:47 +0000 (09:38 +0200)] 
Merge !1409: kresc: remove this client

2 years agokresc: remove this client
Vladimír Čunát [Tue, 13 Jun 2023 07:09:51 +0000 (09:09 +0200)] 
kresc: remove this client

It's never gone beyond experiment/alpha and now we have kresctl
which should be much better.  Keeping installed bin/kresc could
confuse users.

2 years agoMerge !1417: distro/pkg/deb: make manager package arch specific
Vladimír Čunát [Wed, 28 Jun 2023 07:31:39 +0000 (09:31 +0200)] 
Merge !1417: distro/pkg/deb: make manager package arch specific

2 years agodistro/pkg/deb: make manager package arch specific
Jakub Ružička [Mon, 26 Jun 2023 14:06:26 +0000 (16:06 +0200)] 
distro/pkg/deb: make manager package arch specific

The supervisor plugin is compiled and arch specific.

2 years agoMerge !1324: Protocol layers
Vladimír Čunát [Mon, 26 Jun 2023 10:17:18 +0000 (12:17 +0200)] 
Merge !1324: Protocol layers

2 years agoMerge remote-tracking branch 'origin/6.0' into daemon-refactor-2
Oto Šťáva [Fri, 23 Jun 2023 10:20:35 +0000 (12:20 +0200)] 
Merge remote-tracking branch 'origin/6.0' into daemon-refactor-2

2 years agoMerge !1402: packaging changes and improvements for v6 v6.0.1
Vladimír Čunát [Fri, 23 Jun 2023 10:11:55 +0000 (12:11 +0200)] 
Merge !1402: packaging changes and improvements for v6

2 years agodaemon/session2: make copies short-lived buffers when needed
Oto Šťáva [Fri, 23 Jun 2023 09:02:34 +0000 (11:02 +0200)] 
daemon/session2: make copies short-lived buffers when needed

2 years agodistro/pkg/rpm: cleanup an old TODO
Vladimír Čunát [Thu, 22 Jun 2023 16:29:22 +0000 (18:29 +0200)] 
distro/pkg/rpm: cleanup an old TODO

2 years agoBump version to 6.0.1
Jakub Ružička [Thu, 22 Jun 2023 14:24:56 +0000 (16:24 +0200)] 
Bump version to 6.0.1

No need for "a1", 6.0.x versions are reserved for alpha.

2 years agoscripts: shorten devel version string
Jakub Ružička [Tue, 13 Jun 2023 19:23:07 +0000 (21:23 +0200)] 
scripts: shorten devel version string

It's now also PEP440 compatible.

Before:

    6.0.0.1686682076.ad1eaf76.tar.xz

Now:

    6.0.0.dev157+1bcc45.tar.xz

2 years agoscripts: improve make-archive.sh script
Jakub Ružička [Tue, 23 May 2023 11:42:28 +0000 (13:42 +0200)] 
scripts: improve make-archive.sh script

Copy resulting tarball into pkg/archives/dev and delete build_dist/ dir
to keep working copy clean.

2 years agoupgrade-4-to-5: remove the rest of occurrences
Vladimír Čunát [Thu, 22 Jun 2023 14:02:40 +0000 (16:02 +0200)] 
upgrade-4-to-5: remove the rest of occurrences

2 years agodistro/tests: improve systemd service tests debug
Jakub Ružička [Thu, 22 Jun 2023 13:27:38 +0000 (15:27 +0200)] 
distro/tests: improve systemd service tests debug

2 years agodistro/pkg/rpm: drop %check
Vladimír Čunát [Thu, 15 Jun 2023 10:35:32 +0000 (12:35 +0200)] 
distro/pkg/rpm: drop %check

By definition it doesn't allow some kinds of tests.

2 years agodistro/pkg/rpm: drop redundant file listing
Jakub Ružička [Thu, 22 Jun 2023 12:17:35 +0000 (14:17 +0200)] 
distro/pkg/rpm: drop redundant file listing

This prevents

RPM build warnings:
    File listed twice: /usr/lib64/knot-resolver

2 years agodistro/pkg/rpm: align rpm packaging with deb
Jakub Ružička [Wed, 14 Jun 2023 11:54:21 +0000 (13:54 +0200)] 
distro/pkg/rpm: align rpm packaging with deb

2 years agodistro/pkg/deb: maintainer scripts cleanup
Jakub Ružička [Tue, 23 May 2023 10:44:47 +0000 (12:44 +0200)] 
distro/pkg/deb: maintainer scripts cleanup

Remove 4 to 5 upgrade scripts and more.

2 years agodistro/pkg/deb: debian packaging changes for v6
Jakub Ružička [Wed, 17 May 2023 11:00:27 +0000 (13:00 +0200)] 
distro/pkg/deb: debian packaging changes for v6

2 years agodaemon/session2: prevent submitting payloads when session is closing
Oto Šťáva [Thu, 22 Jun 2023 09:25:33 +0000 (11:25 +0200)] 
daemon/session2: prevent submitting payloads when session is closing

2 years agoMerge remote-tracking branch 'origin/6.0' into daemon-refactor-2
Oto Šťáva [Thu, 22 Jun 2023 07:43:18 +0000 (09:43 +0200)] 
Merge remote-tracking branch 'origin/6.0' into daemon-refactor-2

2 years agoMerge !1416: docker: minor fixes
Vladimír Čunát [Thu, 22 Jun 2023 07:05:12 +0000 (09:05 +0200)] 
Merge !1416: docker: minor fixes

2 years agoci docker: make it work with kresd 6.0
Vladimír Čunát [Mon, 19 Jun 2023 12:00:40 +0000 (14:00 +0200)] 
ci docker: make it work with kresd 6.0

The lua CLI is not exposed anymore.

2 years agoDockerfile: really expose all the services
Vladimír Čunát [Mon, 19 Jun 2023 11:17:41 +0000 (13:17 +0200)] 
Dockerfile: really expose all the services

2 years agoMerge branch 'manager-modeling-strict-validation' into '6.0'
Aleš Mrázek [Mon, 19 Jun 2023 12:11:37 +0000 (14:11 +0200)] 
Merge branch 'manager-modeling-strict-validation' into '6.0'

manager: datamodel: global option for config validation strictness

See merge request knot/knot-resolver!1415

2 years agomanager: allowed to get 'rundir' from default config
Aleš Mrázek [Mon, 19 Jun 2023 10:04:47 +0000 (12:04 +0200)] 
manager: allowed to get 'rundir' from default config

2 years agomanager: datamodel: fields types changes
Aleš Mrázek [Thu, 15 Jun 2023 14:37:07 +0000 (16:37 +0200)] 
manager: datamodel: fields types changes

2 years agomanager: cli: validate: --no-strict arg added
Aleš Mrázek [Fri, 16 Jun 2023 12:43:53 +0000 (14:43 +0200)] 
manager: cli: validate: --no-strict arg added

2 years agomanager: datamodel: config validation strictness
Aleš Mrázek [Fri, 16 Jun 2023 12:38:33 +0000 (14:38 +0200)] 
manager: datamodel: config validation strictness

The new global variable is intended to
distinguish between strict and normal validation.

2 years agoMerge !1406: hints: fix names inside home.arpa. obs-knot-resolver-es11k1/deployments/2562 obs-knot-resolver-es11k1/deployments/2563 obs-knot-resolver-es11k1/deployments/2564 obs-knot-resolver-es11k1/deployments/2565 obs-knot-resolver-es11k1/deployments/2566 obs-knot-resolver-es11k1/deployments/2567 obs-knot-resolver-es11k1/deployments/2568 obs-knot-resolver-es11k1/deployments/2569 obs-knot-resolver-es11k1/deployments/2572 obs-knot-resolver-es11k1/deployments/2573 obs-knot-resolver-es11k1/deployments/2574 obs-knot-resolver-es11k1/deployments/2575 obs-knot-resolver-es11k1/deployments/2576 obs-knot-resolver-es11k1/deployments/2577 obs-knot-resolver-es11k1/deployments/2578 obs-knot-resolver-es11k1/deployments/2579 obs-knot-resolver-es11k1/deployments/2580 obs-knot-resolver-es11k1/deployments/2581 obs-knot-resolver-es11k1/deployments/2582 obs-knot-resolver-es11k1/deployments/2583 obs-knot-resolver-es11k1/deployments/2584 obs-knot-resolver-es11k1/deployments/2585 obs-knot-resolver-es11k1/deployments/2586 obs-knot-resolver-es11k1/deployments/2587 obs-knot-resolver-es11k1/deployments/2588 obs-knot-resolver-es11k1/deployments/2589
Vladimír Čunát [Thu, 15 Jun 2023 15:22:44 +0000 (17:22 +0200)] 
Merge !1406: hints: fix names inside home.arpa.

2 years agoMerge !1411: ci: refresh versions of tested distros
Vladimír Čunát [Thu, 15 Jun 2023 15:15:56 +0000 (17:15 +0200)] 
Merge !1411: ci: refresh versions of tested distros

2 years agoci: cleanup forgotten conflict
Vladimír Čunát [Tue, 13 Jun 2023 16:04:36 +0000 (18:04 +0200)] 
ci: cleanup forgotten conflict

2 years agoci: comment on platforms defaulting to python 3.6
Vladimír Čunát [Tue, 13 Jun 2023 16:03:40 +0000 (18:03 +0200)] 
ci: comment on platforms defaulting to python 3.6

2 years agoci pkg:fedora-*: switch to the current versions
Vladimír Čunát [Tue, 13 Jun 2023 15:59:31 +0000 (17:59 +0200)] 
ci pkg:fedora-*: switch to the current versions

2 years agoci pkg:debian-12: add
Vladimír Čunát [Tue, 13 Jun 2023 15:53:53 +0000 (17:53 +0200)] 
ci pkg:debian-12: add

2 years agohints: fix names inside home.arpa.
Vladimír Čunát [Sat, 10 Jun 2023 08:34:12 +0000 (10:34 +0200)] 
hints: fix names inside home.arpa.

Reported on https://forum.turris.cz/t/knot-resolver-with-local-fqdn-hostnames/19034/8

I write it as three comparisons, as it seems like a simple way of
still running only a single comparison in the typical case of QNAME
not falling under .arpa.

Tested just quickly, manually.  This chunk of code already is replaced
for kresd >= 6.0.0.

2 years agoMerge branch 'manager-kresctl-convert-context' into '6.0'
Aleš Mrázek [Thu, 15 Jun 2023 10:16:36 +0000 (12:16 +0200)] 
Merge branch 'manager-kresctl-convert-context' into '6.0'

manager: kresctl: global validation context for convert cmd

See merge request knot/knot-resolver!1414

2 years agomanager: cli: convert: set global validation context
Aleš Mrázek [Thu, 15 Jun 2023 10:14:10 +0000 (12:14 +0200)] 
manager: cli: convert: set global validation context

2 years agoMerge branch 'manager-datamodel-local-data' into '6.0'
Aleš Mrázek [Thu, 15 Jun 2023 09:54:37 +0000 (11:54 +0200)] 
Merge branch 'manager-datamodel-local-data' into '6.0'

manager: datamodel: local-data: missing config options added

See merge request knot/knot-resolver!1413

2 years agomanager /local-data/addresses*: be stricter about errors
Vladimír Čunát [Thu, 15 Jun 2023 09:31:57 +0000 (11:31 +0200)] 
manager /local-data/addresses*: be stricter about errors

In versions before 6.x these errors intentionally didn't cause
the startup fail, but I think we can be more strict now.

2 years agomanager: datamodel: local-data: missing config options added
Aleš Mrázek [Wed, 14 Jun 2023 14:42:48 +0000 (16:42 +0200)] 
manager: datamodel: local-data: missing config options added

2 years agoMerge !1410: manager: new-policy cleanup
Vladimír Čunát [Wed, 14 Jun 2023 08:12:44 +0000 (10:12 +0200)] 
Merge !1410: manager: new-policy cleanup

2 years agomanager: update dev config with policy rules
Aleš Mrázek [Tue, 13 Jun 2023 14:08:05 +0000 (16:08 +0200)] 
manager: update dev config with policy rules

2 years agomanager: unnecessary scripts removed
Aleš Mrázek [Tue, 13 Jun 2023 12:46:49 +0000 (14:46 +0200)] 
manager: unnecessary scripts removed

2 years agoMerge !1412: manager: cli: global validation context
Vladimír Čunát [Wed, 14 Jun 2023 08:10:25 +0000 (10:10 +0200)] 
Merge !1412: manager: cli: global validation context

2 years agomanager: cli: global validation context
Aleš Mrázek [Tue, 13 Jun 2023 21:52:03 +0000 (23:52 +0200)] 
manager: cli: global validation context

2 years agoMerge !1408: ci: drop `doc`; we have `pages` instead now
Vladimír Čunát [Tue, 13 Jun 2023 13:41:08 +0000 (15:41 +0200)] 
Merge !1408: ci: drop `doc`; we have `pages` instead now

2 years agoci: drop `doc`; we have `pages` instead now
Vladimír Čunát [Fri, 9 Jun 2023 19:30:01 +0000 (21:30 +0200)] 
ci: drop `doc`; we have `pages` instead now

The `pages` job works.  We might consolidate this later,
also e.g. drop the doc dependencies from the default image
if we won't really use that image for docs anymore.

2 years agoMerge !1407: new policy engine
Vladimír Čunát [Mon, 12 Jun 2023 09:00:52 +0000 (11:00 +0200)] 
Merge !1407: new policy engine

2 years agolib/rules: DB size+path: make configurable, bump to 100 MiB
Vladimír Čunát [Fri, 9 Jun 2023 09:01:06 +0000 (11:01 +0200)] 
lib/rules: DB size+path: make configurable, bump to 100 MiB

Ideally we'd expand it as needed, but that seems relatively complicated,
so for now let's go big with the sparse file and allow to override.

2 years agolib/cache: improve logging for the LMDB with policy rules
Vladimír Čunát [Thu, 8 Jun 2023 10:07:05 +0000 (12:07 +0200)] 
lib/cache: improve logging for the LMDB with policy rules

In particular, log them with `[rules ]` instead of `[cache ]`

2 years agolib/rules,cache: use transactions, improve assertions
Vladimír Čunát [Tue, 6 Jun 2023 14:13:57 +0000 (16:13 +0200)] 
lib/rules,cache: use transactions, improve assertions

When inserting rules from a config file, process everything
in a single transaction to avoid using inconsistent sets of rules,
especially in a different instance and/or in case some error happens.

Also fix some over-eager assertions (CHECK_RET).

2 years agoci lint:scan-build: fix the error count
Vladimír Čunát [Wed, 24 May 2023 11:05:13 +0000 (13:05 +0200)] 
ci lint:scan-build: fix the error count

The new reports are:
./lib/rules/api.c:301:3: warning: Memory copy function overflows destination buffer
         memcpy(key_data_ruleset_end, &KEY_EXACT_MATCH, sizeof(KEY_EXACT_MATCH));
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/rules/api.c:506:2: warning: Memory copy function overflows destination buffer
 memcpy(key.data, &KEY_EXACT_MATCH, sizeof(KEY_EXACT_MATCH));
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/rules/api.c:699:2: warning: Memory copy function overflows destination buffer
 memcpy(key.data, &KEY_ZONELIKE_A, sizeof(KEY_ZONELIKE_A));
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.

I re-checked those places, and I believe they can never overflow.
I regularly run with ASAN as well, which would catch overflows.
I can't see a simple way of amending the code in a way
that the linter might be happy.

2 years agolib: tweak selection errors when consuming cached answer
Vladimír Čunát [Wed, 24 May 2023 10:12:42 +0000 (12:12 +0200)] 
lib: tweak selection errors when consuming cached answer

Forwarding-related changes uncovered this case
in integration.iter_limits test.  Errors can happen also
when consuming data produced by cache, in which case there's
no suitable server to blame for the error.

2 years agolib/rules forwarding: per-IP .tls
Vladimír Čunát [Wed, 24 May 2023 14:09:13 +0000 (16:09 +0200)] 
lib/rules forwarding: per-IP .tls

We planned it that way for the new config schema - and, why not.

2 years agolib/rules: implement forwarding
Vladimír Čunát [Fri, 19 May 2023 07:09:06 +0000 (09:09 +0200)] 
lib/rules: implement forwarding

Typical use cases should work now, briefly tested:
 - forwarding all to a resolver
 - forwarding a subtree downgraded to insecure (to resolver or auth)
 - forwarding a subtree to auth without changing DNSSEC chain (atypical)

In some places we need to repeat kr_make_query()
The issue is that some of its inputs (e.g. STUB/FORWARD, zone cut)
are now not known at the beginning of PRODUCE yet.
Also, checking that QNAME matches is useless on a cached reply.

2 years agolib/rules: split key construction from insert_trivial_zone()
Vladimír Čunát [Mon, 22 May 2023 15:25:50 +0000 (17:25 +0200)] 
lib/rules: split key construction from insert_trivial_zone()

2 years agolib/rules: move parts from api.c to impl.h
Vladimír Čunát [Mon, 22 May 2023 15:47:26 +0000 (17:47 +0200)] 
lib/rules: move parts from api.c to impl.h

2 years agolib/rules: bugfix ZLA key for the root
Vladimír Čunát [Thu, 18 May 2023 12:46:19 +0000 (14:46 +0200)] 
lib/rules: bugfix ZLA key for the root

2 years agolib/resolve.c: split in two files
Vladimír Čunát [Sun, 7 May 2023 07:46:21 +0000 (09:46 +0200)] 
lib/resolve.c: split in two files

I know that moving code makes e.g. blaming harder,
but this was a really long file now.
This commit _only_ moves code, except for nits:
- minor pieces moved into an -impl.h shared by both resolve*.c
  There a couple functions changed to non-static or static inline.
- order is preserved, for now at least

2 years agonits
Vladimír Čunát [Thu, 4 May 2023 10:48:27 +0000 (12:48 +0200)] 
nits

2 years agodoc comments: fix two cases of "@param is not found"
Vladimír Čunát [Sat, 6 May 2023 09:17:22 +0000 (11:17 +0200)] 
doc comments: fix two cases of "@param is not found"

2 years agolib/rules: add API for loading a zonefile
Vladimír Čunát [Fri, 28 Apr 2023 09:19:33 +0000 (11:19 +0200)] 
lib/rules: add API for loading a zonefile

Two main use cases are actual RPZ file
and also the /local-data/records string (plain RRsets).

The RPZ semantics isn't very close to the specs,
but I believe the practical usability is already better
than our old RPZ implementation, thanks to following CNAMEs.

2 years agolib/rules: allow setting TTL in the trivial zones
Vladimír Čunát [Fri, 21 Apr 2023 09:56:46 +0000 (11:56 +0200)] 
lib/rules: allow setting TTL in the trivial zones

(internally at least, not in api.h yet)

2 years agolib/rules: move more declarations to impl.h
Vladimír Čunát [Fri, 21 Apr 2023 09:42:35 +0000 (11:42 +0200)] 
lib/rules: move more declarations to impl.h