]> git.ipfire.org Git - thirdparty/knot-dns.git/log
thirdparty/knot-dns.git
4 years agoknotd: EDNS cookies - fix missing server cookie over TCP connection
Jan Hák [Mon, 3 Jan 2022 14:39:47 +0000 (15:39 +0100)] 
knotd: EDNS cookies - fix missing server cookie over TCP connection

4 years agoKnot.includes: add all source directories
Daniel Salzman [Wed, 29 Dec 2021 09:47:59 +0000 (10:47 +0100)] 
Knot.includes: add all source directories

4 years agoMerge branch 'kzonesign_verify' into 'master'
Daniel Salzman [Wed, 22 Dec 2021 16:55:35 +0000 (17:55 +0100)] 
Merge branch 'kzonesign_verify' into 'master'

kzonesign: implemented zone verify

See merge request knot/knot-dns!1199

4 years agokzonesign: implemented zone verify
Libor Peltan [Mon, 12 Oct 2020 18:06:27 +0000 (20:06 +0200)] 
kzonesign: implemented zone verify

4 years agotests-extra: ctl/basic -- call zone-purge in the blocking mode
David Vašek [Mon, 20 Dec 2021 12:54:08 +0000 (13:54 +0100)] 
tests-extra: ctl/basic -- call zone-purge in the blocking mode

4 years agoMerge branch 'geoip-checks' into 'master'
Libor Peltan [Mon, 20 Dec 2021 13:20:53 +0000 (14:20 +0100)] 
Merge branch 'geoip-checks' into 'master'

Geoip checks

Closes #778

See merge request knot/knot-dns!1407

4 years agotests: test pre-check of mod-geoip configuration
Libor Peltan [Mon, 20 Dec 2021 13:14:01 +0000 (14:14 +0100)] 
tests: test pre-check of mod-geoip configuration

4 years agoknotc: conf-check checks also configuration database
Daniel Salzman [Thu, 16 Dec 2021 19:29:19 +0000 (20:29 +0100)] 
knotc: conf-check checks also configuration database

4 years agogeoip: check the module configuration file during the general configuration checks
Daniel Salzman [Thu, 16 Dec 2021 13:24:01 +0000 (14:24 +0100)] 
geoip: check the module configuration file during the general configuration checks

4 years agogeoip: move geodb-key checks to geoip_conf_check()
Daniel Salzman [Thu, 16 Dec 2021 09:05:13 +0000 (10:05 +0100)] 
geoip: move geodb-key checks to geoip_conf_check()

4 years agoctl/purge: add a simple error logging
David Vašek [Thu, 16 Dec 2021 22:38:58 +0000 (23:38 +0100)] 
ctl/purge: add a simple error logging

4 years agolibdnssec: fix memleak when pkcs8_import_key() fails
Daniel Salzman [Wed, 15 Dec 2021 15:14:36 +0000 (16:14 +0100)] 
libdnssec: fix memleak when pkcs8_import_key() fails

4 years agoMerge branch 'rrsig_refresh2' into 'master'
Daniel Salzman [Wed, 15 Dec 2021 12:14:50 +0000 (13:14 +0100)] 
Merge branch 'rrsig_refresh2' into 'master'

Rrsig-refresh2

See merge request knot/knot-dns!1404

4 years agodnssec: warn when rrsig-refresh configured explicitly
Libor Peltan [Tue, 14 Dec 2021 19:13:36 +0000 (20:13 +0100)] 
dnssec: warn when rrsig-refresh configured explicitly

4 years agodnssec: enforce safe rrsig-refresh
Libor Peltan [Tue, 14 Dec 2021 18:56:05 +0000 (19:56 +0100)] 
dnssec: enforce safe rrsig-refresh

4 years agoMerge branch 'unit_test_segfault' into 'master'
Daniel Salzman [Wed, 15 Dec 2021 11:37:57 +0000 (12:37 +0100)] 
Merge branch 'unit_test_segfault' into 'master'

tests: fail if some test segfaults or killed

See merge request knot/knot-dns!1406

4 years agotests: fail if some test segfaults or killed
Libor Peltan [Wed, 15 Dec 2021 10:23:52 +0000 (11:23 +0100)] 
tests: fail if some test segfaults or killed

4 years agoMerge branch 'conf_groups_fix' into 'master'
Libor Peltan [Wed, 15 Dec 2021 11:18:39 +0000 (12:18 +0100)] 
Merge branch 'conf_groups_fix' into 'master'

Replace defective conf_mix_iter() with conf_mix_iter_init()

See merge request knot/knot-dns!1405

4 years agoMerge branch 'unreachables' into 'master'
Daniel Salzman [Wed, 15 Dec 2021 11:17:17 +0000 (12:17 +0100)] 
Merge branch 'unreachables' into 'master'

Unreachable remotes

Closes #383

See merge request knot/knot-dns!1395

4 years agoconf: replace defective conf_mix_iter() with conf_mix_iter_init()
Daniel Salzman [Wed, 15 Dec 2021 10:08:34 +0000 (11:08 +0100)] 
conf: replace defective conf_mix_iter() with conf_mix_iter_init()

4 years agoMerge branch 'conf_groups' into 'master'
Libor Peltan [Tue, 14 Dec 2021 16:48:32 +0000 (17:48 +0100)] 
Merge branch 'conf_groups' into 'master'

Remote groups

See merge request knot/knot-dns!1403

4 years agoknotd: add 'remotes' section and allow mixed references of remotes
Daniel Salzman [Sat, 11 Dec 2021 20:03:32 +0000 (21:03 +0100)] 
knotd: add 'remotes' section and allow mixed references of remotes

4 years agoconf: add support for mixed references
Daniel Salzman [Sat, 11 Dec 2021 19:34:01 +0000 (20:34 +0100)] 
conf: add support for mixed references

4 years agokdig: fix empty server in program arguments
Jan Hák [Tue, 14 Dec 2021 13:50:39 +0000 (14:50 +0100)] 
kdig: fix empty server in program arguments

4 years agoknot: change server.remote-retry-delay units from seconds to milliseconds
Daniel Salzman [Tue, 14 Dec 2021 11:16:25 +0000 (12:16 +0100)] 
knot: change server.remote-retry-delay units from seconds to milliseconds

4 years agounreachables: use list_t and unlimited number of remotes
Libor Peltan [Thu, 2 Dec 2021 15:16:25 +0000 (16:16 +0100)] 
unreachables: use list_t and unlimited number of remotes

4 years agounreachables: also consider local 'via' address
Libor Peltan [Thu, 2 Dec 2021 14:28:27 +0000 (15:28 +0100)] 
unreachables: also consider local 'via' address

4 years agorequestor: return proper errcode when send fails
Libor Peltan [Mon, 29 Nov 2021 10:19:27 +0000 (11:19 +0100)] 
requestor: return proper errcode when send fails

4 years agoimplemented tracking of unreachable remotes
Libor Peltan [Fri, 26 Nov 2021 17:10:05 +0000 (18:10 +0100)] 
implemented tracking of unreachable remotes

4 years agoconn-pool: ignore source port in conn_pool_get() in case if set
Daniel Salzman [Sun, 12 Dec 2021 19:45:02 +0000 (20:45 +0100)] 
conn-pool: ignore source port in conn_pool_get() in case if set

4 years agodoc: update key log order during key rollovers
Daniel Salzman [Sat, 11 Dec 2021 18:32:27 +0000 (19:32 +0100)] 
doc: update key log order during key rollovers

4 years agoMerge branch 'rrsig_refresh1' into 'master'
Daniel Salzman [Sat, 11 Dec 2021 18:24:13 +0000 (19:24 +0100)] 
Merge branch 'rrsig_refresh1' into 'master'

dnssec: rrsig-refresh: warn if too low

See merge request knot/knot-dns!1402

4 years agodnssec: rrsig-refresh: warn if too low
Libor Peltan [Fri, 10 Dec 2021 15:20:15 +0000 (16:20 +0100)] 
dnssec: rrsig-refresh: warn if too low

4 years agoMerge branch 'ds_push_ttl' into 'master'
Daniel Salzman [Fri, 10 Dec 2021 11:46:06 +0000 (12:46 +0100)] 
Merge branch 'ds_push_ttl' into 'master'

DS push: use DNSKEY TTL for parent DS

See merge request knot/knot-dns!1401

4 years agoDS push: use DNSKEY TTL for parent DS
Libor Peltan [Fri, 10 Dec 2021 11:14:41 +0000 (12:14 +0100)] 
DS push: use DNSKEY TTL for parent DS

4 years agoMerge branch 'nsec3_iters_check' into 'master'
Libor Peltan [Wed, 8 Dec 2021 11:34:54 +0000 (12:34 +0100)] 
Merge branch 'nsec3_iters_check' into 'master'

NSEC3 iterations defaults to 0

See merge request knot/knot-dns!1400

4 years agoconf: change the default number of NSEC3 iterations to 0
Daniel Salzman [Tue, 7 Dec 2021 12:29:46 +0000 (13:29 +0100)] 
conf: change the default number of NSEC3 iterations to 0

4 years agoconf: add check on using the default number of NSEC3 iterations
Daniel Salzman [Tue, 7 Dec 2021 12:27:48 +0000 (13:27 +0100)] 
conf: add check on using the default number of NSEC3 iterations

4 years agoMerge branch 'offline_ksk_alg_roll' into 'master'
Daniel Salzman [Tue, 7 Dec 2021 12:09:41 +0000 (13:09 +0100)] 
Merge branch 'offline_ksk_alg_roll' into 'master'

tests: scenario of alg roll with offline KSK

See merge request knot/knot-dns!1399

4 years agotests-extra: enable ldns-verify-zone for alg rollovers (it works with new versions)
Daniel Salzman [Tue, 7 Dec 2021 11:57:10 +0000 (12:57 +0100)] 
tests-extra: enable ldns-verify-zone for alg rollovers (it works with new versions)

4 years agotests: scenario of alg roll with offline KSK
Libor Peltan [Fri, 3 Dec 2021 14:36:28 +0000 (15:36 +0100)] 
tests: scenario of alg roll with offline KSK

4 years agolibknot/dname: improve knot_dname_lf() output description
Daniel Salzman [Tue, 7 Dec 2021 09:56:49 +0000 (10:56 +0100)] 
libknot/dname: improve knot_dname_lf() output description

4 years agomod-dnstap: Fix corner case in "Restore the original query QNAME case"
Robert Edmonds [Mon, 6 Dec 2021 20:12:57 +0000 (15:12 -0500)] 
mod-dnstap: Fix corner case in "Restore the original query QNAME case"

Previously, after "mod-dnstap: Restore the original query QNAME case",
the dnstap module would copy the original QNAME into the query packet
buffer passed to the dnstap module, so that the originally cased query
message would be written out to the dnstap logging stream.

However, there are error conditions that can result in the query
packet's 'qname_size' field being updated to a non-zero value (the
question section was successfully parsed), but the packet was ultimately
rejected.

In the prepare_answer() function in src/knot/nameserver/process_query.c,
there are several error return paths that prevent the 'orig_qname' field
from being written by the call to memcpy(). In this case, the
'orig_qname' field in the corresponding knotd_qdata_extra_t object will
remain at an initialized (zeroed out) value.

Before this patch, in some cases (e.g. in responses to some queries that
return FORMERR), mod-dnstap would overwrite the QNAME in the query
packet buffer with 'qname_size' bytes from the 'orig_qname' field. With
'qname_size' set to a non-zero value (due to successful parsing of the
QNAME) but with 'orig_qname' set to its original initialized (zeroed
out) value, this would result in zeroing out the QNAME in the query
packet buffer. This would then result in writing a corrupted query
message into the dnstap logging stream.

Since mod-dnstap writes directly to the query packet buffer rather than
making a copy, this corruption would also be visible to modules
executing after mod-dnstap as well as the rest of knotd.

This patch updates mod-dnstap's msg_query_qname_restore() so that it
avoids copying the original QNAME into the query packet buffer if the
'orig_qname' field has been left in its initialized (zeroed out) value.

fixes #777

4 years agoMerge branch 'ctl_zones_log' into 'master'
Daniel Salzman [Mon, 6 Dec 2021 13:59:17 +0000 (14:59 +0100)] 
Merge branch 'ctl_zones_log' into 'master'

Log the control command for all zones specified (not just the first one)

Closes #776

See merge request knot/knot-dns!1397

4 years agoctl: log the command for all zones specified (not just the first one)
Daniel Salzman [Sat, 4 Dec 2021 14:36:50 +0000 (15:36 +0100)] 
ctl: log the command for all zones specified (not just the first one)

4 years agokeymgr: set brief mode by default and add verbose mode for disabling
Jan Hák [Thu, 2 Dec 2021 09:59:16 +0000 (10:59 +0100)] 
keymgr: set brief mode by default and add verbose mode for disabling

Option --brief is now deprecated.

4 years agodnsproxy: add optional source address match option
Daniel Salzman [Wed, 1 Dec 2021 15:14:45 +0000 (16:14 +0100)] 
dnsproxy: add optional source address match option

4 years agoMerge branch 'sign_pipeline_refactor' into 'master'
Daniel Salzman [Thu, 2 Dec 2021 11:47:04 +0000 (12:47 +0100)] 
Merge branch 'sign_pipeline_refactor' into 'master'

Sign pipeline refactor

See merge request knot/knot-dns!1396

4 years agodnssec: implemented re-salt option on every ZSK roll occasion
Libor Peltan [Mon, 29 Nov 2021 16:44:49 +0000 (17:44 +0100)] 
dnssec: implemented re-salt option on every ZSK roll occasion

4 years agotests: test of incremental signing when re-sign is pending
Libor Peltan [Wed, 1 Dec 2021 21:20:57 +0000 (22:20 +0100)] 
tests: test of incremental signing when re-sign is pending

4 years agodnssec: simplified incremental sign
Libor Peltan [Wed, 1 Dec 2021 14:02:04 +0000 (15:02 +0100)] 
dnssec: simplified incremental sign

4 years agodnssec: signing pipeline code refactoring
Libor Peltan [Wed, 1 Dec 2021 12:14:02 +0000 (13:14 +0100)] 
dnssec: signing pipeline code refactoring

4 years agoMerge branch 'ubuntu2110' into 'master'
Daniel Salzman [Mon, 29 Nov 2021 12:38:56 +0000 (13:38 +0100)] 
Merge branch 'ubuntu2110' into 'master'

tests: compatibility with new Bind

See merge request knot/knot-dns!1393

4 years agoconn-pool: add missing pthread_join() to conn_pool_deinit()
Daniel Salzman [Mon, 29 Nov 2021 11:38:27 +0000 (12:38 +0100)] 
conn-pool: add missing pthread_join() to conn_pool_deinit()

4 years agotests: compatibility with new Bind
Libor Peltan [Mon, 22 Nov 2021 18:08:34 +0000 (19:08 +0100)] 
tests: compatibility with new Bind

4 years agoKnot.includes: keep just the 'src' directory
Daniel Salzman [Thu, 25 Nov 2021 10:07:12 +0000 (11:07 +0100)] 
Knot.includes: keep just the 'src' directory

4 years agoMerge branch 'conn_pool' into 'master'
Daniel Salzman [Fri, 26 Nov 2021 11:51:49 +0000 (12:51 +0100)] 
Merge branch 'conn_pool' into 'master'

Outgoing connection pool

See merge request knot/knot-dns!1382

4 years agoconn-pool: add remote-pool-limit reconfiguration check
Daniel Salzman [Fri, 26 Nov 2021 11:43:16 +0000 (12:43 +0100)] 
conn-pool: add remote-pool-limit reconfiguration check

4 years agoconn-pool: hide conn_pool_get_old()
Daniel Salzman [Thu, 25 Nov 2021 11:27:18 +0000 (12:27 +0100)] 
conn-pool: hide conn_pool_get_old()

4 years agoconn-pool: replace conn_pool_put_force() with conn_pool_put()
Daniel Salzman [Wed, 24 Nov 2021 13:15:00 +0000 (14:15 +0100)] 
conn-pool: replace conn_pool_put_force() with conn_pool_put()

4 years agoconn-pool: only keep conn when request finished and ok
Libor Peltan [Wed, 27 Oct 2021 09:19:56 +0000 (11:19 +0200)] 
conn-pool: only keep conn when request finished and ok

4 years agoconn-pool: dont reuse conns that have pending data
Libor Peltan [Wed, 27 Oct 2021 09:18:48 +0000 (11:18 +0200)] 
conn-pool: dont reuse conns that have pending data

4 years agoimplemented pool of opened outgoing conenctions
Libor Peltan [Fri, 22 Oct 2021 09:51:44 +0000 (11:51 +0200)] 
implemented pool of opened outgoing conenctions

4 years agospelling
Josh Soref [Wed, 24 Nov 2021 11:55:31 +0000 (12:55 +0100)] 
spelling

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
4 years agoscripts: add probe_dump.py
Daniel Salzman [Fri, 19 Nov 2021 16:10:59 +0000 (17:10 +0100)] 
scripts: add probe_dump.py

4 years agopython: various probe improvements
Daniel Salzman [Fri, 19 Nov 2021 10:21:15 +0000 (11:21 +0100)] 
python: various probe improvements

4 years agoscripts: extend Makefile.docker
Daniel Salzman [Mon, 22 Nov 2021 12:38:20 +0000 (13:38 +0100)] 
scripts: extend Makefile.docker

- Enabled fastparser
- Temporarily disabled unittests (dthreads test fails on armhf)
- Added release tag

4 years agoDockerfile: add options and improve building
Daniel Salzman [Mon, 22 Nov 2021 12:27:25 +0000 (13:27 +0100)] 
Dockerfile: add options and improve building

- New option FASTPARSER=disable|enable
- New option CHECK=disable|enable for unittests execution
- Explicit CFLAGS="-g -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 -fstack-protector-strong"
- Added --enable-dnstap

4 years agokzonesign: refactoring, add support for confdb and auto detection
Daniel Salzman [Sun, 17 Oct 2021 18:50:15 +0000 (20:50 +0200)] 
kzonesign: refactoring, add support for confdb and auto detection

4 years agoutils: unify error logging
Daniel Salzman [Sun, 17 Oct 2021 18:19:05 +0000 (20:19 +0200)] 
utils: unify error logging

4 years agoutils: unify and refactor error processing
Daniel Salzman [Fri, 15 Oct 2021 17:48:59 +0000 (19:48 +0200)] 
utils: unify and refactor error processing

4 years agodoc: hightlight impact on XFR for tcp-io-timeout
Daniel Salzman [Mon, 15 Nov 2021 08:19:04 +0000 (09:19 +0100)] 
doc: hightlight impact on XFR for tcp-io-timeout

4 years agotcp-handler: improve debug message when tcp-io-timeout is reached
Daniel Salzman [Mon, 15 Nov 2021 08:11:53 +0000 (09:11 +0100)] 
tcp-handler: improve debug message when tcp-io-timeout is reached

4 years agoload: add zone file name to info/error log message
Daniel Salzman [Mon, 15 Nov 2021 07:22:55 +0000 (08:22 +0100)] 
load: add zone file name to info/error log message

4 years agoMerge branch 'xfr_failovers' into 'master'
Daniel Salzman [Fri, 12 Nov 2021 18:19:21 +0000 (19:19 +0100)] 
Merge branch 'xfr_failovers' into 'master'

Xfr failovers

See merge request knot/knot-dns!1385

4 years agozone: don't log remote not usable if local error
Daniel Salzman [Fri, 12 Nov 2021 18:10:44 +0000 (19:10 +0100)] 
zone: don't log remote not usable if local error

4 years agofixed minor memleak when zone-in-journal serialization fails
Libor Peltan [Tue, 2 Nov 2021 10:59:06 +0000 (11:59 +0100)] 
fixed minor memleak when zone-in-journal serialization fails

4 years agofixed minor memleak when full update fails writing journal
Libor Peltan [Tue, 2 Nov 2021 10:36:36 +0000 (11:36 +0100)] 
fixed minor memleak when full update fails writing journal

4 years agorefresh: carefully decide axfr/address/remote failover
Libor Peltan [Mon, 1 Nov 2021 21:14:57 +0000 (22:14 +0100)] 
refresh: carefully decide axfr/address/remote failover

4 years agoMerge branch 'dynarray_changes' into 'master'
Libor Peltan [Fri, 12 Nov 2021 09:38:24 +0000 (10:38 +0100)] 
Merge branch 'dynarray_changes' into 'master'

dynarray: remove even duplicate items

See merge request knot/knot-dns!1392

4 years agotests: dynarray -- test removal of duplicate items
David Vašek [Wed, 10 Nov 2021 12:47:13 +0000 (13:47 +0100)] 
tests: dynarray -- test removal of duplicate items

4 years agodynarray: when removing an item by replacing it with the last one, check that item too
David Vašek [Fri, 5 Nov 2021 23:40:23 +0000 (00:40 +0100)] 
dynarray: when removing an item by replacing it with the last one, check that item too

This prevents a situtation when the deleted item may repeat in the array.
This solution is based on the assumption that the duplicate entries are rather rare.

4 years agoMerge branch 'kdig_nitpicks' into 'master'
Daniel Salzman [Tue, 9 Nov 2021 07:10:35 +0000 (08:10 +0100)] 
Merge branch 'kdig_nitpicks' into 'master'

Kdig nitpicks

See merge request knot/knot-dns!1389

4 years agokdig: +noretry means zero retries
Libor Peltan [Fri, 5 Nov 2021 10:39:44 +0000 (11:39 +0100)] 
kdig: +noretry means zero retries

4 years agokdig: interpret zero timeout as infinity
Libor Peltan [Fri, 5 Nov 2021 10:37:11 +0000 (11:37 +0100)] 
kdig: interpret zero timeout as infinity

4 years agokdig: fix documented default EDNS bufsize
Libor Peltan [Fri, 5 Nov 2021 10:35:18 +0000 (11:35 +0100)] 
kdig: fix documented default EDNS bufsize

4 years agoMerge branch 'ci-new-distros' into 'master'
Daniel Salzman [Mon, 8 Nov 2021 20:52:47 +0000 (21:52 +0100)] 
Merge branch 'ci-new-distros' into 'master'

ci/distrotests: add new fedora,ubuntu

See merge request knot/knot-dns!1391

4 years agoci/distrotests: add new fedora,ubuntu
Tomas Krizek [Mon, 8 Nov 2021 15:20:57 +0000 (16:20 +0100)] 
ci/distrotests: add new fedora,ubuntu

4 years agoMerge branch 'unittest_ed448' into 'master'
Daniel Salzman [Mon, 8 Nov 2021 08:19:31 +0000 (09:19 +0100)] 
Merge branch 'unittest_ed448' into 'master'

tests: added unit tests of libdnssec with ed448 alg

See merge request knot/knot-dns!1390

4 years agotests: added unit tests of libdnssec with ed448 alg
Libor Peltan [Fri, 5 Nov 2021 17:00:24 +0000 (18:00 +0100)] 
tests: added unit tests of libdnssec with ed448 alg

4 years agoMerge branch 'zonemd_remove' into 'master'
Daniel Salzman [Thu, 4 Nov 2021 14:57:35 +0000 (15:57 +0100)] 
Merge branch 'zonemd_remove' into 'master'

zonemd: option to systematicly remove

Closes #760

See merge request knot/knot-dns!1386

4 years agozonemd: option to systematicly remove
Libor Peltan [Wed, 3 Nov 2021 13:27:02 +0000 (14:27 +0100)] 
zonemd: option to systematicly remove

4 years agoMerge branch 'ds_push_cname' into 'master'
Daniel Salzman [Wed, 3 Nov 2021 17:50:12 +0000 (18:50 +0100)] 
Merge branch 'ds_push_cname' into 'master'

DS push: fix querying parent SOA if CNAME present at non-terminal

See merge request knot/knot-dns!1387

4 years agoDS push: fix querying parent SOA if CNAME present at non-terminal
Libor Peltan [Wed, 3 Nov 2021 15:47:27 +0000 (16:47 +0100)] 
DS push: fix querying parent SOA if CNAME present at non-terminal

4 years agoconf: prefetch server.nsid value
Romain Labolle [Tue, 2 Nov 2021 23:16:29 +0000 (00:16 +0100)] 
conf: prefetch server.nsid value

fixes #774

4 years agoconf: update hostname from conf_new() only
Daniel Salzman [Wed, 3 Nov 2021 12:51:02 +0000 (13:51 +0100)] 
conf: update hostname from conf_new() only

This avoids problems with future changes and reduces overhead of conf_clone()

4 years agoconfigure: get the absolute path to modules without use of readlink
David Vašek [Tue, 2 Nov 2021 11:50:12 +0000 (12:50 +0100)] 
configure: get the absolute path to modules without use of readlink

4 years agoconfigure: use the readlink command in a way compatible with macOS
David Vašek [Tue, 2 Nov 2021 11:14:17 +0000 (12:14 +0100)] 
configure: use the readlink command in a way compatible with macOS

While there, fix the use of space containing paths in this operation.

4 years agodnstap: add missing include
Daniel Salzman [Tue, 2 Nov 2021 14:46:13 +0000 (15:46 +0100)] 
dnstap: add missing include

4 years agomod-dnstap: Restore the original query QNAME case
Robert Edmonds [Tue, 2 Nov 2021 14:16:01 +0000 (15:16 +0100)] 
mod-dnstap: Restore the original query QNAME case

Previously, mod-dnstap would log query messages with downcased QNAMEs,
because knotd had already downcased the QNAME in the query packet buffer
passed to the dnstap module. This is not necessarily the same as the
original DNS wire query message if any uppercase letters were used in
the QNAME.

The knotd_qdata_t object already stores the original QNAME before
downcasing in the 'extra' field, which is inaccessible to query modules.
This commit introduces a new 'knotd_qdata_orig_qname()' function that
query modules can call to access the original QNAME.

This commit updates the mod-dnstap message logging code to patch the
buffer used for the wire message behind the 'query_message' field in the
dnstap protobuf message by copying the original QNAME back into the
query packet buffer, and then re-downcasing the QNAME in the query
packet buffer after the dnstap protobuf message has been serialized.
(This avoids the overhead of allocating space for a copy of the query
packet, making a copy of the packet, and performing the QNAME
restoration on the copy.)

fixes #773