]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
3 years agopolicy: work around a .local problem on some distros local-resolved-workaround
Vladimír Čunát [Fri, 12 Nov 2021 18:12:03 +0000 (19:12 +0100)] 
policy: work around a .local problem on some distros

It's probably caused by certain range of systemd-resolved versions.

3 years agoMerge branch 'zonemd-misc' into 'master' obs-knot-resolver-es11k1/deployments/1914
Tomas Krizek [Wed, 3 Nov 2021 14:45:41 +0000 (15:45 +0100)] 
Merge branch 'zonemd-misc' into 'master'

various refactoring

See merge request knot/knot-resolver!1221

3 years agolib/cache: improve internal docs
Vladimír Čunát [Tue, 2 Nov 2021 16:06:50 +0000 (17:06 +0100)] 
lib/cache: improve internal docs

3 years agolib/cache kr_cache_insert_rr(): add another parameter
Vladimír Čunát [Mon, 4 Oct 2021 07:47:59 +0000 (09:47 +0200)] 
lib/cache kr_cache_insert_rr(): add another parameter

NSEC* params were not being stashed by this function.  For prefilling
it's useful, but doing it on *every* NSEC* record would be quite a waste,
so we introduce a parameter to select this.

Implementation: there were good reasons not to implement this until
needed - it wasn't straightforward at all.

3 years agocontrib/mempattern: add mm_ctx_delete()
Vladimír Čunát [Mon, 4 Oct 2021 07:53:34 +0000 (09:53 +0200)] 
contrib/mempattern: add mm_ctx_delete()

It was a bit weird that the API had mempool creation but no deletion.

3 years agolib/utils: factor out kr_timer_* from GC code
Vladimír Čunát [Mon, 27 Sep 2021 08:35:04 +0000 (10:35 +0200)] 
lib/utils: factor out kr_timer_* from GC code

Also be more careful about rounding, overflows and assertions in there.
The implicit internal timer was unused and didn't seem worth keeping.

3 years agolib/util: remove unused function
Vladimír Čunát [Mon, 27 Sep 2021 07:36:30 +0000 (09:36 +0200)] 
lib/util: remove unused function

The POSIX APIs using `struct timeval` are deprecated anyway
in favor of clock_gettime() + `struct timespec`.

The function didn't seem well designed anyway, as `long` is just
32-bit on usual 32-bit platforms, which certainly isn't safe.
(roughly one month, on a quick glance)

3 years agoMerge branch 'ipvx_priming_fix' into 'master'
Tomas Krizek [Wed, 3 Nov 2021 14:40:50 +0000 (15:40 +0100)] 
Merge branch 'ipvx_priming_fix' into 'master'

modules/priming: don't query A/AAAA when IPv4/IPv6 is disabled

See merge request knot/knot-resolver!1222

3 years agomodules/priming: don't query A/AAAA when IPv4/IPv6 is disabled
Štěpán Balážik [Tue, 2 Nov 2021 16:22:45 +0000 (17:22 +0100)] 
modules/priming: don't query A/AAAA when IPv4/IPv6 is disabled

Previously we primed for A/AAAA addresses of root servers even when
the respective IP version was disabled from configuration.

3 years agoMerge branch 'zonemd-validator' into 'master'
Tomas Krizek [Wed, 3 Nov 2021 14:39:37 +0000 (15:39 +0100)] 
Merge branch 'zonemd-validator' into 'master'

lib/dnssec: refactor some parts

See merge request knot/knot-resolver!1213

3 years agolib/dnssec.h: improve API docs
Vladimír Čunát [Tue, 2 Nov 2021 09:19:02 +0000 (10:19 +0100)] 
lib/dnssec.h: improve API docs

3 years agolib/dnssec/signature nit: improve API docs
Vladimír Čunát [Mon, 4 Oct 2021 10:50:31 +0000 (12:50 +0200)] 
lib/dnssec/signature nit: improve API docs

3 years agolib/dnssec: add a simple validator API
Vladimír Čunát [Fri, 24 Sep 2021 10:00:15 +0000 (12:00 +0200)] 
lib/dnssec: add a simple validator API

3 years agolib/dnssec: make kr_dnskeys_trusted() cleaner
Vladimír Čunát [Tue, 14 Sep 2021 15:46:19 +0000 (17:46 +0200)] 
lib/dnssec: make kr_dnskeys_trusted() cleaner

This way it will be easier to re-use (and more efficient).
I really disliked those searches for RRSIGs embedded deep inside.

Uh, I tried to keep the new function as clean as possible,
moving hacks to outside.

3 years agolib/dnssec: add a simpler version of kr_rrset_validate_with_key()
Vladimír Čunát [Tue, 14 Sep 2021 15:35:24 +0000 (17:35 +0200)] 
lib/dnssec: add a simpler version of kr_rrset_validate_with_key()

3 years agolib/dnssec: factor out trim_ttl()
Vladimír Čunát [Fri, 3 Sep 2021 08:40:15 +0000 (10:40 +0200)] 
lib/dnssec: factor out trim_ttl()

That `pkt` check was useless.

3 years agolib/dnssec refactor: struct dseckey -> struct dnssec_key
Vladimír Čunát [Sat, 28 Aug 2021 09:36:03 +0000 (11:36 +0200)] 
lib/dnssec refactor: struct dseckey -> struct dnssec_key

I can't see motivation to add another abstraction layer here,
and it caused ugly type juggling.  Let's use the libdnssec's type.

3 years agolib/dnssec.c: refactor validate_rrsig_rr()
Vladimír Čunát [Sat, 28 Aug 2021 09:11:35 +0000 (11:11 +0200)] 
lib/dnssec.c: refactor validate_rrsig_rr()

3 years agoMerge !1218: doc: lua-basexx dependency, clarify unit tests
Vladimír Čunát [Wed, 3 Nov 2021 10:10:50 +0000 (11:10 +0100)] 
Merge !1218: doc: lua-basexx dependency, clarify unit tests

3 years agodoc: Add missing lua-basexx dependency, clarify default unit tests
Oto Šťáva [Mon, 25 Oct 2021 13:53:57 +0000 (15:53 +0200)] 
doc: Add missing lua-basexx dependency, clarify default unit tests

3 years agoMerge branch 'docker-debug-mode-log' into 'master' obs-knot-resolver-es11k1/deployments/1906 obs-knot-resolver-es11k1/deployments/1907 obs-knot-resolver-es11k1/deployments/1908 obs-knot-resolver-es11k1/deployments/1909 obs-knot-resolver-es11k1/deployments/1910 obs-knot-resolver-es11k1/deployments/1911 obs-knot-resolver-es11k1/deployments/1912 obs-knot-resolver-es11k1/deployments/1913
Tomas Krizek [Wed, 27 Oct 2021 13:55:59 +0000 (15:55 +0200)] 
Merge branch 'docker-debug-mode-log' into 'master'

Dockerfile: polish request tracing in debug_mode

See merge request knot/knot-resolver!1217

3 years agoDockerfile: polish request tracing in debug_mode
Tomas Krizek [Fri, 22 Oct 2021 13:26:42 +0000 (15:26 +0200)] 
Dockerfile: polish request tracing in debug_mode

Since v5.4.0, using both debug level log and request tracing duplicates
lines in the log output. This makes the log more readable while
hopefully keeping all the relevant information there.

3 years agoMerge branch 'ci-knot-3.1' into 'master'
Tomas Krizek [Wed, 27 Oct 2021 12:27:10 +0000 (14:27 +0200)] 
Merge branch 'ci-knot-3.1' into 'master'

ci: use knot 3.1

See merge request knot/knot-resolver!1219

3 years agoci: fix pylint issues
Tomas Krizek [Wed, 27 Oct 2021 11:29:11 +0000 (13:29 +0200)] 
ci: fix pylint issues

3 years agoci: use Knot 3.1
Tomas Krizek [Tue, 26 Oct 2021 14:02:25 +0000 (16:02 +0200)] 
ci: use Knot 3.1

3 years agoMerge branch 'policy-rpz-origin' into 'master' obs-knot-resolver-es11k1/deployments/1900 obs-knot-resolver-es11k1/deployments/1901 obs-knot-resolver-es11k1/deployments/1902 obs-knot-resolver-es11k1/deployments/1903 obs-knot-resolver-es11k1/deployments/1904 obs-knot-resolver-es11k1/deployments/1905
Tomas Krizek [Thu, 21 Oct 2021 11:34:00 +0000 (13:34 +0200)] 
Merge branch 'policy-rpz-origin' into 'master'

policy.rpz: fix origin detection in files without $ORIGIN

See merge request knot/knot-resolver!1215

3 years agopolicy.rpz: nitpick - format zone file
Tomas Krizek [Wed, 20 Oct 2021 14:50:22 +0000 (16:50 +0200)] 
policy.rpz: nitpick - format zone file

3 years agopolicy.rpz: test coverage for SOA-defined origin
Tomas Krizek [Wed, 20 Oct 2021 14:49:48 +0000 (16:49 +0200)] 
policy.rpz: test coverage for SOA-defined origin

3 years agopolicy.rpz: increase log severity
Vladimír Čunát [Mon, 18 Oct 2021 12:29:13 +0000 (14:29 +0200)] 
policy.rpz: increase log severity

Issues affecting functionality of the RPZ should NOT be hidden
by default.

3 years agopolicy.rpz: fix origin detection in files without $ORIGIN
Vladimír Čunát [Mon, 18 Oct 2021 11:31:58 +0000 (13:31 +0200)] 
policy.rpz: fix origin detection in files without $ORIGIN

3 years agoMerge branch 'systemd_nss-lookup' into 'master' obs-knot-resolver-es11k1/deployments/1899
Tomas Krizek [Wed, 20 Oct 2021 12:42:56 +0000 (14:42 +0200)] 
Merge branch 'systemd_nss-lookup' into 'master'

systemd: add interaction with nss-lookup.target

See merge request knot/knot-resolver!1216

3 years agosystemd: add interaction with nss-lookup.target obs-knot-resolver-bs4hbr/deployments/1898
Vladimír Čunát [Wed, 20 Oct 2021 09:10:47 +0000 (11:10 +0200)] 
systemd: add interaction with nss-lookup.target

The point is to allow other services wait for DNS availability.
Of course, kresd may not be the DNS provider for this machine,
but it seems reasonable to still do this by default.

3 years agoMerge branch 'release-5-4-2' into 'master' obs-knot-resolver-8xyvhu/deployments/1890 obs-knot-resolver-es11k1/deployments/1891 obs-knot-resolver-es11k1/deployments/1892 obs-knot-resolver-es11k1/deployments/1893 obs-knot-resolver-es11k1/deployments/1894 obs-knot-resolver-es11k1/deployments/1896 obs-knot-resolver-es11k1/deployments/1897 obs-knot-resolver-kv62s6/deployments/1889 v5.4.2
Tomas Krizek [Wed, 13 Oct 2021 11:13:09 +0000 (13:13 +0200)] 
Merge branch 'release-5-4-2' into 'master'

release 5.4.2

See merge request knot/knot-resolver!1212

3 years agorelease 5.4.2
Tomas Krizek [Wed, 13 Oct 2021 10:04:40 +0000 (12:04 +0200)] 
release 5.4.2

3 years agoscripts: remove ljezek from PGP keyblock
Tomas Krizek [Wed, 13 Oct 2021 10:04:14 +0000 (12:04 +0200)] 
scripts: remove ljezek from PGP keyblock

3 years agoMerge branch 'nitpicks' into 'master'
Tomas Krizek [Wed, 13 Oct 2021 10:00:35 +0000 (12:00 +0200)] 
Merge branch 'nitpicks' into 'master'

nitpicks

See merge request knot/knot-resolver!1206

3 years agodaemon/worker: work around a rare crash obs-knot-resolver-bs4hbr/deployments/1887
Vladimír Čunát [Tue, 12 Oct 2021 07:52:16 +0000 (09:52 +0200)] 
daemon/worker: work around a rare crash

So far we have no idea how it can happen, but in this (rare) case
it seems fine to keep the process running.

3 years agodistro/test: turn off OBS packaging tests for CentOS7
Tomas Krizek [Mon, 11 Oct 2021 09:45:45 +0000 (11:45 +0200)] 
distro/test: turn off OBS packaging tests for CentOS7

Builds are still checked by the other pkftest suite. However, OBS
mirrors for CentOS 7 are just problematic. We've already tried to
contact them once, they fixed the issue but mentioned it will probably
come back. No point in wasting any more time with this test then.

3 years agoetc/config: fix typo in privacy example
Tomas Krizek [Mon, 11 Oct 2021 08:45:39 +0000 (10:45 +0200)] 
etc/config: fix typo in privacy example

3 years agodoc: update install instructions
Tomas Krizek [Wed, 6 Oct 2021 13:32:12 +0000 (15:32 +0200)] 
doc: update install instructions

3 years agodistro/tests: update to leap 15.3
Tomas Krizek [Thu, 26 Aug 2021 15:26:46 +0000 (17:26 +0200)] 
distro/tests: update to leap 15.3

3 years agoNEWS 5.3.2: add CVE-2021-40083 reference
Vladimír Čunát [Wed, 25 Aug 2021 11:20:17 +0000 (13:20 +0200)] 
NEWS 5.3.2: add CVE-2021-40083 reference

3 years agoCI: improve README.md
Vladimír Čunát [Thu, 12 Aug 2021 13:47:08 +0000 (15:47 +0200)] 
CI: improve README.md

Our "debian-buster" CI image was clearly not a buster
(based on versions in logs).  I suspect this change can help.

3 years agotrie_del: use KNOT_EOK instead of kr_ok()
Tomas Krizek [Thu, 19 Aug 2021 14:59:05 +0000 (16:59 +0200)] 
trie_del: use KNOT_EOK instead of kr_ok()

3 years agoMerge branch 'knot-headers' into 'master' obs-knot-resolver-es11k1/deployments/1886 obs-knot-resolver-es11k1/deployments/1888
Tomas Krizek [Mon, 11 Oct 2021 11:55:06 +0000 (13:55 +0200)] 
Merge branch 'knot-headers' into 'master'

build: fix when knot-dns headers are on non-standard location

See merge request knot/knot-resolver!1210

3 years agodistro/tests: fix leap15 test
Tomas Krizek [Mon, 11 Oct 2021 08:57:47 +0000 (10:57 +0200)] 
distro/tests: fix leap15 test

knot-utils package is needed for kdig. However, if downstream package is
used, that tool is part of knot pkg instead - thus the missing package
would be non-critical. It is still needed if upstream packages are used.

3 years agobuild: fix when knot-dns headers are on non-standard location
Vladimír Čunát [Thu, 7 Oct 2021 11:58:01 +0000 (13:58 +0200)] 
build: fix when knot-dns headers are on non-standard location

3 years agoMerge branch 'detect_time_skew-nits' into 'master' obs-knot-resolver-es11k1/deployments/1882 obs-knot-resolver-es11k1/deployments/1883 obs-knot-resolver-es11k1/deployments/1884
Tomas Krizek [Fri, 8 Oct 2021 09:27:13 +0000 (11:27 +0200)] 
Merge branch 'detect_time_skew-nits' into 'master'

modules/detect_time_skew: minor fixes

See merge request knot/knot-resolver!1211

3 years agomodules/detect_time_skew: avoid cached `NS .`
Vladimír Čunát [Fri, 8 Oct 2021 07:40:26 +0000 (09:40 +0200)] 
modules/detect_time_skew: avoid cached `NS .`

Cache is persistent (in principle) and it might not have accurate data
for whatever reason.  Let's not bring caching complications into this.
It's cheap: just a single query to root server(s) on resolver start.

3 years agomodules/detect_time_skew: fix wording of the message
Vladimír Čunát [Fri, 8 Oct 2021 07:36:28 +0000 (09:36 +0200)] 
modules/detect_time_skew: fix wording of the message

Local time appears in future == the signatures appear not valid
*anymore*, and vice versa.

3 years agoMerge !1207: lib/selection: improve the NO6 behavior obs-knot-resolver-es11k1/deployments/1880
Vladimír Čunát [Thu, 7 Oct 2021 11:55:20 +0000 (13:55 +0200)] 
Merge !1207: lib/selection: improve the NO6 behavior

3 years agolib/selection: improve the NO6 behavior
Vladimír Čunát [Fri, 3 Sep 2021 16:41:11 +0000 (18:41 +0200)] 
lib/selection: improve the NO6 behavior

With broken IPv6 and no knowledge of IP addresses, we were quite often
chosing to resolve a NS's AAAA and then using it... which wasn't good.
Let's give preference to A here as well.

3 years agoMerge branch 'distrotest-centos-ca-certs' into 'master' obs-knot-resolver-es11k1/deployments/1877 obs-knot-resolver-es11k1/deployments/1878 obs-knot-resolver-es11k1/deployments/1879
Tomas Krizek [Mon, 4 Oct 2021 12:25:16 +0000 (14:25 +0200)] 
Merge branch 'distrotest-centos-ca-certs' into 'master'

distro/test: update CA certificates for CentOS

See merge request knot/knot-resolver!1209

3 years agodistro/test: update CA certificates for CentOS obs-knot-resolver-bs4hbr/deployments/1876
Tomas Krizek [Mon, 4 Oct 2021 11:40:05 +0000 (13:40 +0200)] 
distro/test: update CA certificates for CentOS

On CentOS 7, the base image has an outdated LetsEncrypt certificate.

3 years agoMerge !1208: lua: use notice level for log() obs-knot-resolver-es11k1/deployments/1862 obs-knot-resolver-es11k1/deployments/1863 obs-knot-resolver-es11k1/deployments/1864 obs-knot-resolver-es11k1/deployments/1865 obs-knot-resolver-es11k1/deployments/1866 obs-knot-resolver-es11k1/deployments/1867 obs-knot-resolver-es11k1/deployments/1868 obs-knot-resolver-es11k1/deployments/1869 obs-knot-resolver-es11k1/deployments/1870 obs-knot-resolver-es11k1/deployments/1871 obs-knot-resolver-es11k1/deployments/1873 obs-knot-resolver-es11k1/deployments/1874 obs-knot-resolver-es11k1/deployments/1875
Vladimír Čunát [Mon, 20 Sep 2021 08:37:32 +0000 (10:37 +0200)] 
Merge !1208: lua: use notice level for log()

3 years agolib/log: check the *last* log group number
Tomas Krizek [Wed, 15 Sep 2021 14:48:42 +0000 (16:48 +0200)] 
lib/log: check the *last* log group number

3 years agolua: use notice level for log()
Tomas Krizek [Wed, 15 Sep 2021 14:43:53 +0000 (16:43 +0200)] 
lua: use notice level for log()

By default, notice level is set. Thus, if users want to use log() in the
same way as pre-5.4, they'd have to increase the log level. This bumps
the log level of log() function to keep the same behavior.

3 years agoMerge !1205: distro/tests: add debian11 obs-knot-resolver-es11k1/deployments/1841 obs-knot-resolver-es11k1/deployments/1842 obs-knot-resolver-es11k1/deployments/1843 obs-knot-resolver-es11k1/deployments/1844 obs-knot-resolver-es11k1/deployments/1845 obs-knot-resolver-es11k1/deployments/1846 obs-knot-resolver-es11k1/deployments/1847 obs-knot-resolver-es11k1/deployments/1848 obs-knot-resolver-es11k1/deployments/1849 obs-knot-resolver-es11k1/deployments/1850 obs-knot-resolver-es11k1/deployments/1851 obs-knot-resolver-es11k1/deployments/1852 obs-knot-resolver-es11k1/deployments/1853 obs-knot-resolver-es11k1/deployments/1854 obs-knot-resolver-es11k1/deployments/1855 obs-knot-resolver-es11k1/deployments/1856 obs-knot-resolver-es11k1/deployments/1857 obs-knot-resolver-es11k1/deployments/1858 obs-knot-resolver-es11k1/deployments/1859 obs-knot-resolver-es11k1/deployments/1860 obs-knot-resolver-es11k1/deployments/1861
Vladimír Čunát [Mon, 30 Aug 2021 16:03:35 +0000 (18:03 +0200)] 
Merge !1205: distro/tests: add debian11

3 years agoci: fix lint:pendantic
Tomas Krizek [Mon, 30 Aug 2021 13:00:12 +0000 (15:00 +0200)] 
ci: fix lint:pendantic

3 years agoscripts: fix scanbuild on debian 11
Tomas Krizek [Mon, 30 Aug 2021 12:50:26 +0000 (14:50 +0200)] 
scripts: fix scanbuild on debian 11

3 years agotests/pytests: configure pylint to ignore consider-using-with
Tomas Krizek [Mon, 30 Aug 2021 13:00:44 +0000 (15:00 +0200)] 
tests/pytests: configure pylint to ignore consider-using-with

3 years agotests/pytests: remove dead code
Tomas Krizek [Mon, 30 Aug 2021 11:05:57 +0000 (13:05 +0200)] 
tests/pytests: remove dead code

3 years agoci: migrate jobs to debian 11
Tomas Krizek [Mon, 30 Aug 2021 13:09:33 +0000 (15:09 +0200)] 
ci: migrate jobs to debian 11

3 years agodoc: fix build on debian 11
Tomas Krizek [Mon, 30 Aug 2021 13:09:19 +0000 (15:09 +0200)] 
doc: fix build on debian 11

3 years agodistro/tests: add debian11
Tomas Krizek [Thu, 19 Aug 2021 11:33:09 +0000 (13:33 +0200)] 
distro/tests: add debian11

3 years agoMerge branch 'dns64-features' into 'master' obs-knot-resolver-es11k1/deployments/1835 obs-knot-resolver-es11k1/deployments/1837 obs-knot-resolver-es11k1/deployments/1838 obs-knot-resolver-es11k1/deployments/1839 obs-knot-resolver-es11k1/deployments/1840 495/merge 506/merge 581/merge 818/merge
Tomas Krizek [Wed, 25 Aug 2021 11:32:53 +0000 (11:32 +0000)] 
Merge branch 'dns64-features' into 'master'

modules/dns64: new features

Closes #478 and #368

See merge request knot/knot-resolver!1201

3 years agomodules/dns64: improve code readability
Tomas Krizek [Mon, 23 Aug 2021 16:03:36 +0000 (18:03 +0200)] 
modules/dns64: improve code readability

3 years agomodules/dns64: document the new features
Vladimír Čunát [Tue, 10 Aug 2021 18:28:28 +0000 (20:28 +0200)] 
modules/dns64: document the new features

3 years agomodules/dns64: implement "exclusion prefixes"
Vladimír Čunát [Tue, 10 Aug 2021 17:42:28 +0000 (19:42 +0200)] 
modules/dns64: implement "exclusion prefixes"

The RFC says we MUST do it, though this implementation is lazy and
avoids a SHOULD in the RFC.

3 years agolib/utils kr_straddr_subnet() nit
Vladimír Čunát [Tue, 10 Aug 2021 17:34:40 +0000 (19:34 +0200)] 
lib/utils kr_straddr_subnet() nit

For example, absolute path meant for AF_UNIX could confuse this.

3 years agomodules/dns64: add kr_query::flags.DNS64_DISABLE
Vladimír Čunát [Tue, 10 Aug 2021 08:42:54 +0000 (10:42 +0200)] 
modules/dns64: add kr_query::flags.DNS64_DISABLE

It's not a perfect solution and with the future policy engine it will
hopefully be better, but it's really trivial to add this already.
(should've done that years ago)

3 years agomodules/dns64: also map the reverse (PTR) subtree
Vladimír Čunát [Mon, 9 Aug 2021 18:28:58 +0000 (20:28 +0200)] 
modules/dns64: also map the reverse (PTR) subtree

3 years agomodules/dns64: allow configuring by a table
Vladimír Čunát [Tue, 10 Aug 2021 09:21:13 +0000 (11:21 +0200)] 
modules/dns64: allow configuring by a table

Backward compatible.  It will be useful when adding further features.
Also improve config error traces.

3 years agoMerge branch 'release-5-4-1' into 'master' obs-knot-resolver-8xyvhu/deployments/1828 obs-knot-resolver-es11k1/deployments/1829 obs-knot-resolver-es11k1/deployments/1830 obs-knot-resolver-es11k1/deployments/1831 obs-knot-resolver-es11k1/deployments/1832 obs-knot-resolver-es11k1/deployments/1833 obs-knot-resolver-es11k1/deployments/1834 obs-knot-resolver-kv62s6/deployments/1827 v5.4.1
Tomas Krizek [Thu, 19 Aug 2021 12:31:38 +0000 (12:31 +0000)] 
Merge branch 'release-5-4-1' into 'master'

release 5.4.1

See merge request knot/knot-resolver!1204

3 years agorelease 5.4.1
Tomas Krizek [Thu, 19 Aug 2021 11:33:27 +0000 (13:33 +0200)] 
release 5.4.1

3 years agoMerge branch 'doh2-free-unsent-streams' into 'master'
Tomas Krizek [Thu, 19 Aug 2021 12:26:41 +0000 (12:26 +0000)] 
Merge branch 'doh2-free-unsent-streams' into 'master'

doh2: ensure memory from unsent streams is freed

See merge request knot/knot-resolver!1202

3 years agodoh2: use stream_write_data instead of stream user_data obs-knot-resolver-bs4hbr/deployments/1824
Tomas Krizek [Wed, 18 Aug 2021 14:22:17 +0000 (16:22 +0200)] 
doh2: use stream_write_data instead of stream  user_data

3 years agodoh2: handle OOM when allocating callbacks
Tomas Krizek [Wed, 18 Aug 2021 14:09:33 +0000 (16:09 +0200)] 
doh2: handle OOM when allocating callbacks

3 years agodoh2: ensure memory from unsent streams is freed
Tomas Krizek [Wed, 18 Aug 2021 13:18:27 +0000 (15:18 +0200)] 
doh2: ensure memory from unsent streams is freed

The nghttp2 on_stream_close callback is only called for streams that are
properly closed. If we need to tear down the HTTP connection due to any
reason (e.g. IO error in underlying layer), some streams may not be
propely closed.

Due to HTTP/2 flow control, we may also wait indefinitely for the data
to be written. This can also cause the stream to never be properly
closed.

To handle these cases, a reference of allocated data is kept and we
ensure everything is freed once we're closing the http session.

3 years agoMerge !1203: docker: update to Debian 11 obs-knot-resolver-es11k1/deployments/1823
Vladimír Čunát [Wed, 18 Aug 2021 15:23:18 +0000 (15:23 +0000)] 
Merge !1203: docker: update to Debian 11

3 years agodocker: update to Debian 11
Tomas Krizek [Wed, 18 Aug 2021 15:10:12 +0000 (17:10 +0200)] 
docker: update to Debian 11

3 years agoMerge branch 'log-policy' into 'master' obs-knot-resolver-es11k1/deployments/1817 obs-knot-resolver-es11k1/deployments/1818 obs-knot-resolver-es11k1/deployments/1819 obs-knot-resolver-es11k1/deployments/1820 obs-knot-resolver-es11k1/deployments/1821 obs-knot-resolver-es11k1/deployments/1822 1144/merge
Tomas Krizek [Tue, 10 Aug 2021 20:06:39 +0000 (20:06 +0000)] 
Merge branch 'log-policy' into 'master'

policy trace-logging improvements, mainly

See merge request knot/knot-resolver!1199

3 years agomodules/bogus_log nits
Vladimír Čunát [Mon, 9 Aug 2021 08:00:12 +0000 (10:00 +0200)] 
modules/bogus_log nits

- use notice log level instead of error
  The failure is often a normal condition but we probably want it
  logged by default (after explicitly loading the module).
- don't repeat the "dnssec" word twice in a row (+update docs)
- docs bogus_log.frequent(): we format tables differently (old change)

3 years agopolicy docs: rewrite the section about logging actions
Vladimír Čunát [Fri, 6 Aug 2021 19:19:13 +0000 (21:19 +0200)] 
policy docs: rewrite the section about logging actions

Partly to document changes from recent changes,
partly to fix long-lasting issues in the descriptions.
Hopefully it will be easier to understand now.

3 years agopolicy trace-logging improvements
Vladimír Čunát [Fri, 6 Aug 2021 17:17:18 +0000 (19:17 +0200)] 
policy trace-logging improvements

The logs can be triggered from policy actions, in per-request fashion:
- they're on LOG_DEBUG level but always sent, regardless of log config
- those messages will show double group tags: "[reqdbg][foo   ]"
  (but they lack proper meta-data - about location of the log's origin)
- reqdbg is *in addition* to normal logs, so the lines may be duplicated
  if that's how the logging was configured

3 years agolib/log: add [rdebug] group
Vladimír Čunát [Fri, 6 Aug 2021 17:10:34 +0000 (19:10 +0200)] 
lib/log: add [rdebug] group

It's special: always on and not shown in log_groups() output.

It's been quite a long fight to find how to best deal with such
a special case (from user perspective; code itself is easy).

3 years agotrace_log: include the "[group]" tag in the messages
Vladimír Čunát [Wed, 4 Aug 2021 09:40:30 +0000 (11:40 +0200)] 
trace_log: include the "[group]" tag in the messages

3 years agolua kr_request_t::selected:tostring(): adjust style
Vladimír Čunát [Wed, 4 Aug 2021 18:59:59 +0000 (20:59 +0200)] 
lua kr_request_t::selected:tostring(): adjust style

The result gets logged as a single multi-line message,
so let's not repeat any prefix on (some of) those in-the-middle lines.

3 years agolib/log kr_log_fmt(): pass parameters more properly
Vladimír Čunát [Wed, 4 Aug 2021 19:11:51 +0000 (21:11 +0200)] 
lib/log kr_log_fmt(): pass parameters more properly

Systemd docs say:
> Those arguments must contain valid journal entries including
> the variable name, e.g. "CODE_FILE=src/foo.c", [...]

I tried that passing all three strings empty (without variable name)
wouldn't result into the line getting logged; the suggested style does.

3 years agolib/log nit: fix order of the levels
Vladimír Čunát [Thu, 5 Aug 2021 08:46:50 +0000 (10:46 +0200)] 
lib/log nit: fix order of the levels

I suspect it was me who broke the ordering here.

3 years agoadjust RR-dumping style a little
Vladimír Čunát [Fri, 6 Aug 2021 09:52:26 +0000 (11:52 +0200)] 
adjust RR-dumping style a little

The former "default" dumping style isn't really used anywhere in Knot.
The only visible difference is that RRSIGs are now logged *without*
replacing their TTLs by the original non-decremented TTL values.
That can avoid some confusion when reading debug logs.
(Those original TTLs are still shown a bit further on each line.)

3 years agodaemon: fix --version output
Vladimír Čunát [Thu, 5 Aug 2021 08:44:38 +0000 (10:44 +0200)] 
daemon: fix --version output

Logging is not set up at this point; it wouldn't be shown unless
preceded by -v/--verbose.

3 years agoMerge branch 'nits' into 'master'
Tomas Krizek [Mon, 9 Aug 2021 12:36:04 +0000 (12:36 +0000)] 
Merge branch 'nits' into 'master'

various tiny changes

See merge request knot/knot-resolver!1200

3 years agoci build:macOS: skip in security repo
Vladimír Čunát [Fri, 11 Dec 2020 08:00:36 +0000 (09:00 +0100)] 
ci build:macOS: skip in security repo

Code wouldn't be leaked.  We'd just send the branch name to GH servers.
Still, it' better to skip the step.

3 years agolua kres.type: add new constants
Vladimír Čunát [Mon, 9 Aug 2021 06:41:55 +0000 (08:41 +0200)] 
lua kres.type: add new constants

This is all that's missing in comparison to enum knot_rr_type.
For now I didn't remove types that aren't present there (anymore),
even though noone would miss them, most likely.

3 years agodoc/build: add a couple optional dependencies
Vladimír Čunát [Fri, 9 Jul 2021 09:50:51 +0000 (11:50 +0200)] 
doc/build: add a couple optional dependencies

Also improve a few details.

3 years agodnstap: avoid a false-positive warning
Vladimír Čunát [Mon, 3 May 2021 17:53:35 +0000 (19:53 +0200)] 
dnstap: avoid a false-positive warning

../modules/dnstap/dnstap.c: In function 'dnstap_config':
../modules/dnstap/dnstap.c:410:29: warning: 'strndup' specified bound 4096 exceeds source size 17 [-Wstringop-overread]
  410 |                 sock_path = strndup(DEFAULT_SOCK_PATH, PATH_MAX);
      |                             ^
../modules/dnstap/dnstap.c:423:37: warning: 'strndup' specified bound 4096 exceeds source size 17 [-Wstringop-overread]
  423 |                         sock_path = strndup(DEFAULT_SOCK_PATH, PATH_MAX);
      |                                     ^

We don't need to restrict our built-in path defaults to PATH_MAX
characters, as they just can't be that long and it's not an issue if we
shoot over it anyway - opening such a file would only fail.

3 years agoMerge branch 'kres_gen_test-cross' into 'master' obs-knot-resolver-es11k1/deployments/1815 obs-knot-resolver-es11k1/deployments/1816
Tomas Krizek [Thu, 5 Aug 2021 11:53:19 +0000 (11:53 +0000)] 
Merge branch 'kres_gen_test-cross' into 'master'

daemon/lua/meson.build: disable kres_gen_test on cross

See merge request knot/knot-resolver!1198

3 years agodaemon/lua/meson.build: disable kres_gen_test on cross
Vladimír Čunát [Thu, 5 Aug 2021 08:10:16 +0000 (10:10 +0200)] 
daemon/lua/meson.build: disable kres_gen_test on cross

I considered switching it to our usual 3-option combo,
but that way didn't really seem useful.

3 years agodaemon/lua/meson.build: whitespace
Vladimír Čunát [Thu, 5 Aug 2021 08:09:05 +0000 (10:09 +0200)] 
daemon/lua/meson.build: whitespace

I didn't intend to use this mix of tabs and spaces for indentation.