]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
4 years agodaemon/http: replace assertions doh-errors
Tomas Krizek [Mon, 15 Mar 2021 12:42:21 +0000 (13:42 +0100)] 
daemon/http: replace assertions

4 years agodaemon/http: fix assertion fail when data frame is recieved
Lukáš Ježek [Fri, 12 Mar 2021 12:36:37 +0000 (13:36 +0100)] 
daemon/http: fix assertion fail when data frame is recieved

4 years agodaemon/http: refuse stream on failure
Lukáš Ježek [Fri, 12 Mar 2021 11:12:22 +0000 (12:12 +0100)] 
daemon/http: refuse stream on failure

4 years agodaemon/http: free allocated memory after sending error msg
Tomas Krizek [Mon, 8 Mar 2021 14:30:49 +0000 (15:30 +0100)] 
daemon/http: free allocated memory after sending error msg

4 years agodaemon/http: optimize code by using trie instead of array macros
Tomas Krizek [Mon, 8 Mar 2021 11:19:29 +0000 (12:19 +0100)] 
daemon/http: optimize code by using trie instead of array macros

4 years agodoh2: added control stream to each test
Lukáš Ježek [Tue, 9 Feb 2021 10:58:23 +0000 (11:58 +0100)] 
doh2: added control stream to each test

4 years agodoh2: fix sending errors
Lukáš Ježek [Tue, 19 Jan 2021 14:37:13 +0000 (15:37 +0100)] 
doh2: fix sending errors

4 years agodoh2: send HTTP error status code
Lukáš Ježek [Fri, 27 Nov 2020 08:43:13 +0000 (09:43 +0100)] 
doh2: send HTTP error status code

4 years agoRevert "Merge branch '618-doh2-respond-to-invalid-requests-with-proper-status-code...
Tomas Krizek [Tue, 30 Mar 2021 11:30:51 +0000 (13:30 +0200)] 
Revert "Merge branch '618-doh2-respond-to-invalid-requests-with-proper-status-code' into 'master'"

This reverts commit 4079a1a962cc528b30d8b0b330c329bf83d85fe8, reversing
changes made to a900fdbf47c181487edf8c6c07a079708c2647e3.

4 years agoRevert "Merge branch 'odvr-doh-assert' into 'master'"
Tomas Krizek [Tue, 30 Mar 2021 11:29:21 +0000 (13:29 +0200)] 
Revert "Merge branch 'odvr-doh-assert' into 'master'"

This reverts commit 4dab349e269364b8d27415a548e90446aaac11fb, reversing
changes made to 4bcf335de92bf51b22fe3d517f532a219c4b76cd.

4 years agoRevert "Merge branch 'doh-remove-asserts' into 'master'"
Tomas Krizek [Tue, 30 Mar 2021 11:28:54 +0000 (13:28 +0200)] 
Revert "Merge branch 'doh-remove-asserts' into 'master'"

This reverts commit 99e6e75427031918adeabd8da6b151a5170d3f57, reversing
changes made to 65bed85f897dd004fbe5234d40aaa60d9cabee1e.

4 years agoMerge !1155: policy.STUB: try to avoid TCP obs-knot-dns-deve-jq0xxt/deployments/1547 obs-knot-dns-deve-jq0xxt/deployments/1549 obs-knot-resolver-es11k1/deployments/1546 obs-knot-resolver-es11k1/deployments/1548
Vladimír Čunát [Sat, 27 Mar 2021 08:45:00 +0000 (08:45 +0000)] 
Merge !1155: policy.STUB: try to avoid TCP

4 years agopolicy/README: fix "DNS-over-UDP" mentions
Vladimír Čunát [Tue, 23 Mar 2021 10:29:42 +0000 (11:29 +0100)] 
policy/README: fix "DNS-over-UDP" mentions

Regressed in acd019db2.  The intention was clearly to say that
encryption (i.e. DNS-over-TLS) is not supported.

4 years agolib/selection*: more precise flags.TCP
Vladimír Čunát [Tue, 23 Mar 2021 10:16:01 +0000 (11:16 +0100)] 
lib/selection*: more precise flags.TCP

I'm overall unsure here, but this does seem as improvement.

4 years agolib/selection*: try to avoid TCP in STUB mode
Vladimír Čunát [Tue, 23 Mar 2021 10:11:44 +0000 (11:11 +0100)] 
lib/selection*: try to avoid TCP in STUB mode

The target of STUB might commonly not have good support
for "advanced" features like TCP.

4 years agoMerge branch 'tls_forward-dead_IP' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1541 obs-knot-dns-deve-jq0xxt/deployments/1543 obs-knot-dns-deve-jq0xxt/deployments/1545 obs-knot-resolver-es11k1/deployments/1540 obs-knot-resolver-es11k1/deployments/1542 obs-knot-resolver-es11k1/deployments/1544
Tomas Krizek [Wed, 24 Mar 2021 12:43:01 +0000 (12:43 +0000)] 
Merge branch 'tls_forward-dead_IP' into 'master'

policy.TLS_FORWARD: better avoid dead addresses

See merge request knot/knot-resolver!1156

4 years agopolicy.TLS_FORWARD: better avoid dead addresses
Vladimír Čunát [Wed, 24 Mar 2021 09:58:25 +0000 (10:58 +0100)] 
policy.TLS_FORWARD: better avoid dead addresses

4 years agoMerge branch 'modules-return-error' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1531 obs-knot-dns-deve-jq0xxt/deployments/1533 obs-knot-dns-deve-jq0xxt/deployments/1535 obs-knot-dns-deve-jq0xxt/deployments/1537 obs-knot-dns-deve-jq0xxt/deployments/1539 obs-knot-resolver-es11k1/deployments/1530 obs-knot-resolver-es11k1/deployments/1532 obs-knot-resolver-es11k1/deployments/1534 obs-knot-resolver-es11k1/deployments/1536 obs-knot-resolver-es11k1/deployments/1538
Tomas Krizek [Fri, 19 Mar 2021 16:09:36 +0000 (16:09 +0000)] 
Merge branch 'modules-return-error' into 'master'

lib/resolve *_LAYERS: detect bad return code from module

See merge request knot/knot-resolver!1151

4 years agolib/resolve *_LAYERS: detect bad return code from module
Vladimír Čunát [Sat, 13 Mar 2021 09:02:20 +0000 (10:02 +0100)] 
lib/resolve *_LAYERS: detect bad return code from module

Practical example was now in dnstap (060349c9).  This way we detect
such mistakes more often and closer to their point of origin.

4 years agoMerge branch 'cap-explore-timeout' into 'master'
Tomas Krizek [Fri, 19 Mar 2021 12:51:38 +0000 (12:51 +0000)] 
Merge branch 'cap-explore-timeout' into 'master'

selection: cap the timeout value when probing a random server

See merge request knot/knot-resolver!1154

4 years agoselection: cap the timeout value when probing a random server
Štěpán Balážik [Wed, 17 Mar 2021 14:53:33 +0000 (15:53 +0100)] 
selection: cap the timeout value when probing a random server

This patch caps the timeout set on UDP queries to servers chosen in the
EXPLORE phase of the selection algorithm to two times the timeout that
would be set if we were EXPLOITing.

This measns that we no longer spend an unreasonable amount of time
probing servers that are probably dead anyway while ensuring that we do
probe them from time to time to check if they didn't come to life.

If the timeout value is capped and the server fails to respond, we don't
punish the server for it i.e. we don't cache the timeout.

4 years agoMerge !1150: selection_iter.c: fix the last stand switch to UDP obs-knot-dns-deve-jq0xxt/deployments/1527 obs-knot-dns-deve-jq0xxt/deployments/1528 obs-knot-resolver-es11k1/deployments/1526 obs-knot-resolver-es11k1/deployments/1529
Vladimír Čunát [Wed, 17 Mar 2021 17:54:24 +0000 (17:54 +0000)] 
Merge !1150: selection_iter.c: fix the last stand switch to UDP

4 years agolib/selection_iter.c: fix the last stand switch to UDP
Štěpán Balážik [Fri, 12 Mar 2021 12:36:42 +0000 (13:36 +0100)] 
lib/selection_iter.c: fix the last stand switch to UDP

Previously, qry->flags.TCP flag was incorectly set, which led
to incorrect logging and maybe other troubles down the line.

4 years agoMerge branch 'gc-rtt' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1525 obs-knot-resolver-8xyvhu/deployments/1523 obs-knot-resolver-es11k1/deployments/1524
Tomas Krizek [Tue, 16 Mar 2021 11:23:56 +0000 (11:23 +0000)] 
Merge branch 'gc-rtt' into 'master'

utils/cache_gc: fix crashes/assertions on RTT entries

See merge request knot/knot-resolver!1153

4 years agoci: run simple GC sanity check
Tomas Krizek [Tue, 16 Mar 2021 10:54:26 +0000 (11:54 +0100)] 
ci: run simple GC sanity check

4 years agoutils/cache_gc: fix crashes/assertions on RTT entries
Vladimír Čunát [Tue, 16 Mar 2021 09:39:50 +0000 (10:39 +0100)] 
utils/cache_gc: fix crashes/assertions on RTT entries

I missed some parts when finishing this.  I should've tested it better.
GC would hit assertions or NULL dereferences when removing entries,
and eventually that would lead to cache overflowing (and getting
cleared).

4 years agoMerge branch 'doh-remove-asserts' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1521 obs-knot-resolver-8xyvhu/deployments/1520 obs-knot-resolver-es11k1/deployments/1522
Tomas Krizek [Mon, 15 Mar 2021 13:03:10 +0000 (13:03 +0000)] 
Merge branch 'doh-remove-asserts' into 'master'

daemon/http: replace assertions

See merge request knot/knot-resolver!1152

4 years agodaemon/http: replace assertions
Tomas Krizek [Mon, 15 Mar 2021 12:42:21 +0000 (13:42 +0100)] 
daemon/http: replace assertions

4 years agoMerge branch 'ci-obs-repos' into 'master' obs-knot-resolver-8xyvhu/deployments/1519
Tomas Krizek [Mon, 15 Mar 2021 10:17:36 +0000 (10:17 +0000)] 
Merge branch 'ci-obs-repos' into 'master'

ci: update ODVR distros

See merge request knot/knot-resolver!1148

4 years agoci: update ODVR distros
Tomas Krizek [Thu, 11 Mar 2021 16:18:48 +0000 (17:18 +0100)] 
ci: update ODVR distros

4 years agoMerge branch 'odvr-doh-assert' into 'master'
Tomas Krizek [Mon, 15 Mar 2021 10:16:02 +0000 (10:16 +0000)] 
Merge branch 'odvr-doh-assert' into 'master'

doh2: refuse stream on failure

See merge request knot/knot-resolver!1149

4 years agodaemon/http: fix assertion fail when data frame is recieved
Lukáš Ježek [Fri, 12 Mar 2021 12:36:37 +0000 (13:36 +0100)] 
daemon/http: fix assertion fail when data frame is recieved

4 years agodaemon/http: refuse stream on failure
Lukáš Ježek [Fri, 12 Mar 2021 11:12:22 +0000 (12:12 +0100)] 
daemon/http: refuse stream on failure

4 years agoMerge branch 'dnstap-return-errors' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1511 obs-knot-dns-deve-jq0xxt/deployments/1513 obs-knot-dns-deve-jq0xxt/deployments/1515 obs-knot-dns-deve-jq0xxt/deployments/1518 obs-knot-resolver-8xyvhu/deployments/1510 obs-knot-resolver-es11k1/deployments/1512 obs-knot-resolver-es11k1/deployments/1514 obs-knot-resolver-es11k1/deployments/1516 obs-knot-resolver-es11k1/deployments/1517
Tomas Krizek [Thu, 11 Mar 2021 15:57:29 +0000 (15:57 +0000)] 
Merge branch 'dnstap-return-errors' into 'master'

dnstap: don't break request resolution on dnstap errors

See merge request knot/knot-resolver!1147

4 years agodnstap: don't break request resolution on dnstap errors
Vladimír Čunát [Thu, 11 Mar 2021 14:23:28 +0000 (15:23 +0100)] 
dnstap: don't break request resolution on dnstap errors

This isn't a regression of 5.3.0 changes.
Layer functions are supposed to return new values for ctx->state,
but here we were sometimes returning kr_error(EFOO) which altered
processing of the request.

Our case: answers directly from policy module would not end up
finishing the request and we'd hit an assert at the end of processing.

4 years agoMerge branch '618-doh2-respond-to-invalid-requests-with-proper-status-code' into... obs-knot-dns-deve-jq0xxt/deployments/1506 obs-knot-dns-deve-jq0xxt/deployments/1509 obs-knot-resolver-es11k1/deployments/1507 obs-knot-resolver-es11k1/deployments/1508
Tomas Krizek [Tue, 9 Mar 2021 10:42:16 +0000 (10:42 +0000)] 
Merge branch '618-doh2-respond-to-invalid-requests-with-proper-status-code' into 'master'

doh2: send HTTP error status code

Closes #618

See merge request knot/knot-resolver!1102

4 years agodaemon/http: free allocated memory after sending error msg
Tomas Krizek [Mon, 8 Mar 2021 14:30:49 +0000 (15:30 +0100)] 
daemon/http: free allocated memory after sending error msg

4 years agodaemon/http: optimize code by using trie instead of array macros
Tomas Krizek [Mon, 8 Mar 2021 11:19:29 +0000 (12:19 +0100)] 
daemon/http: optimize code by using trie instead of array macros

4 years agodoh2: added control stream to each test
Lukáš Ježek [Tue, 9 Feb 2021 10:58:23 +0000 (11:58 +0100)] 
doh2: added control stream to each test

4 years agodoh2: fix sending errors
Lukáš Ježek [Tue, 19 Jan 2021 14:37:13 +0000 (15:37 +0100)] 
doh2: fix sending errors

4 years agodoh2: send HTTP error status code
Lukáš Ježek [Fri, 27 Nov 2020 08:43:13 +0000 (09:43 +0100)] 
doh2: send HTTP error status code

4 years agoMerge branch 'doc-predict' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1492 obs-knot-dns-deve-jq0xxt/deployments/1494 obs-knot-dns-deve-jq0xxt/deployments/1496 obs-knot-dns-deve-jq0xxt/deployments/1499 obs-knot-dns-deve-jq0xxt/deployments/1500 obs-knot-dns-deve-jq0xxt/deployments/1502 obs-knot-dns-deve-jq0xxt/deployments/1505 obs-knot-resolver-es11k1/deployments/1493 obs-knot-resolver-es11k1/deployments/1495 obs-knot-resolver-es11k1/deployments/1497 obs-knot-resolver-es11k1/deployments/1498 obs-knot-resolver-es11k1/deployments/1501 obs-knot-resolver-es11k1/deployments/1503 obs-knot-resolver-es11k1/deployments/1504
Tomas Krizek [Tue, 2 Mar 2021 16:39:07 +0000 (17:39 +0100)] 
Merge branch 'doc-predict' into 'master'

predict docs: better explain how it works

See merge request knot/knot-resolver!1145

4 years agopredict docs: better explain how it works
Vladimír Čunát [Tue, 2 Mar 2021 13:39:26 +0000 (14:39 +0100)] 
predict docs: better explain how it works

4 years agoMerge branch 'release-5.3.0' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1482 obs-knot-dns-deve-jq0xxt/deployments/1485 obs-knot-dns-deve-jq0xxt/deployments/1486 obs-knot-dns-deve-jq0xxt/deployments/1489 obs-knot-dns-deve-jq0xxt/deployments/1490 obs-knot-resolver-8xyvhu/deployments/1481 obs-knot-resolver-es11k1/deployments/1483 obs-knot-resolver-es11k1/deployments/1484 obs-knot-resolver-es11k1/deployments/1487 obs-knot-resolver-es11k1/deployments/1488 obs-knot-resolver-es11k1/deployments/1491 obs-knot-resolver-kv62s6/deployments/1480 v5.3.0
Tomas Krizek [Thu, 25 Feb 2021 13:04:49 +0000 (14:04 +0100)] 
Merge branch 'release-5.3.0' into 'master'

release 5.3.0

See merge request knot/knot-resolver!1138

4 years agorelease 5.3.0
Tomas Krizek [Fri, 12 Feb 2021 10:18:01 +0000 (11:18 +0100)] 
release 5.3.0

4 years agoMerge branch 'selection-no6' into 'master'
Tomas Krizek [Thu, 25 Feb 2021 12:43:18 +0000 (13:43 +0100)] 
Merge branch 'selection-no6' into 'master'

lib/selection: add simple detection of IPv6 being broken

See merge request knot/knot-resolver!1143

4 years agolib/selection: add simple detection of IPv6 being broken
Vladimír Čunát [Wed, 24 Feb 2021 10:33:51 +0000 (11:33 +0100)] 
lib/selection: add simple detection of IPv6 being broken

Details are described in code comments.

4 years agoMerge branch 'selection-tweaks' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1476 obs-knot-dns-deve-jq0xxt/deployments/1477 obs-knot-dns-deve-jq0xxt/deployments/1479
Tomas Krizek [Mon, 22 Feb 2021 10:34:14 +0000 (11:34 +0100)] 
Merge branch 'selection-tweaks' into 'master'

lib/selection: halve the default timeout (for iteration)

See merge request knot/knot-resolver!1141

4 years agolib/selection: halve the default timeout (for iteration)
Vladimír Čunát [Fri, 19 Feb 2021 09:40:22 +0000 (10:40 +0100)] 
lib/selection: halve the default timeout (for iteration)

4 years agoMerge branch 'switch_to_udp' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1468 obs-knot-dns-deve-jq0xxt/deployments/1471 obs-knot-dns-deve-jq0xxt/deployments/1472 obs-knot-resolver-bs4hbr/deployments/1469 obs-knot-resolver-bs4hbr/deployments/1470 obs-knot-resolver-bs4hbr/deployments/1473
Tomas Krizek [Fri, 19 Feb 2021 10:15:12 +0000 (11:15 +0100)] 
Merge branch 'switch_to_udp' into 'master'

lib/selection{,_iter}.c: allow switching back to UDP

See merge request knot/knot-resolver!1140

4 years agolib/selection{,_iter}.c: allow switching back to UDP
Štěpán Balážik [Thu, 18 Feb 2021 11:10:26 +0000 (12:10 +0100)] 
lib/selection{,_iter}.c: allow switching back to UDP

Switching to TCP instead of querying very slow servers over UDP has had
unwanted side effect – we would sometimes get stuck with a server
permanently switched to TCP. And if the server happens to not reply over
TCP we were in trouble.

Therefore after we TCP connect fails or timeouts we provide one last
chance for the server over UDP. This will not prevent the next request
to try TCP again on this server again, but we don't care because
DNS MUST ******* work over TCP.

4 years agoMerge branch 'sendmmsg-logs' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1454 obs-knot-dns-deve-jq0xxt/deployments/1456 obs-knot-dns-deve-jq0xxt/deployments/1457 obs-knot-dns-deve-jq0xxt/deployments/1460 obs-knot-dns-deve-jq0xxt/deployments/1463 obs-knot-dns-deve-jq0xxt/deployments/1464 obs-knot-dns-deve-jq0xxt/deployments/1467 obs-knot-resolver-bs4hbr/deployments/1453 obs-knot-resolver-bs4hbr/deployments/1455 obs-knot-resolver-bs4hbr/deployments/1458 obs-knot-resolver-bs4hbr/deployments/1461 obs-knot-resolver-bs4hbr/deployments/1462 obs-knot-resolver-bs4hbr/deployments/1465 obs-knot-resolver-bs4hbr/deployments/1466
Tomas Krizek [Fri, 12 Feb 2021 12:03:41 +0000 (13:03 +0100)] 
Merge branch 'sendmmsg-logs' into 'master'

daemon/udp_queue: drop the error logging

See merge request knot/knot-resolver!1139

4 years agodaemon/udp_queue: drop the error logging
Vladimír Čunát [Fri, 12 Feb 2021 09:06:25 +0000 (10:06 +0100)] 
daemon/udp_queue: drop the error logging

We should do this for all transports and probably just in verbose mode.
We were printing lots of these on Turris OS (for one user at least):
https://forum.turris.cz/t/5-1-8-kresd-throwing-many-errors-in-var-log-messages/14775

EACCESS in particular apparently may happen (on Linux) when the network
is "unavailable", EPERM because of firewall/netfilter:
https://stackoverflow.com/a/23869102

4 years agoMerge !1137: bump required Knot DNS version to 2.9
Vladimír Čunát [Fri, 12 Feb 2021 10:03:10 +0000 (11:03 +0100)] 
Merge !1137: bump required Knot DNS version to 2.9

4 years agobump required Knot DNS version to 2.9
Tomas Krizek [Wed, 10 Feb 2021 15:01:17 +0000 (16:01 +0100)] 
bump required Knot DNS version to 2.9

4 years agoMerge branch 'http-trace-stability' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1451 obs-knot-resolver-bs4hbr/deployments/1450
Tomas Krizek [Thu, 11 Feb 2021 10:25:43 +0000 (11:25 +0100)] 
Merge branch 'http-trace-stability' into 'master'

modules/{http,watchdog}: fix stability problems

See merge request knot/knot-resolver!1136

4 years agomodules/{http,watchdog}: fix stability problems
Vladimír Čunát [Wed, 10 Feb 2021 11:56:14 +0000 (12:56 +0100)] 
modules/{http,watchdog}: fix stability problems

As first noted in commit d1a229ae9, in some cases we do call chains that
are not supported for JIT in LuaJIT.

I'm not 100% sure all of these are needed to comply, but the functions
here are really small and probably not to be that heavily used,
so I don't think it will be costly to interpret them
(and avoiding crashes is more important).

In my tests this fixed occasional crashes when using http://*/trace/*

4 years agoMerge branch 'knot-3.1' into 'master'
Tomas Krizek [Thu, 11 Feb 2021 09:59:17 +0000 (10:59 +0100)] 
Merge branch 'knot-3.1' into 'master'

adapt to knot 3.1 changes

See merge request knot/knot-resolver!1134

4 years agoadapt to libknot 3.1 API changes in XDP
Vladimír Čunát [Tue, 22 Dec 2020 08:07:27 +0000 (09:07 +0100)] 
adapt to libknot 3.1 API changes in XDP

4 years agoMerge branch 'sonarcloud-fixup' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1445 obs-knot-dns-deve-jq0xxt/deployments/1447 obs-knot-resolver-bs4hbr/deployments/1446 obs-knot-resolver-bs4hbr/deployments/1448
Tomas Krizek [Tue, 9 Feb 2021 16:33:00 +0000 (17:33 +0100)] 
Merge branch 'sonarcloud-fixup' into 'master'

ci: Sonarcloud fixup

See merge request knot/knot-resolver!1135

4 years agoci: fix .gitlabci sonarcloud line folding
Tomas Krizek [Tue, 9 Feb 2021 16:13:19 +0000 (17:13 +0100)] 
ci: fix .gitlabci sonarcloud line folding

4 years agoMerge branch 'sonarcloud' into 'master'
Tomas Krizek [Tue, 9 Feb 2021 13:04:04 +0000 (14:04 +0100)] 
Merge branch 'sonarcloud' into 'master'

ci: sonarcloud improvements

See merge request knot/knot-resolver!1121

4 years agoci sonarcloud: add project version (git describe)
Vladimír Čunát [Thu, 7 Jan 2021 11:23:39 +0000 (12:23 +0100)] 
ci sonarcloud: add project version (git describe)

and break the overlong line

4 years agoMerge branch 'policy.ANSWER' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1443 obs-knot-resolver-bs4hbr/deployments/1444
Tomas Krizek [Mon, 8 Feb 2021 15:41:43 +0000 (16:41 +0100)] 
Merge branch 'policy.ANSWER' into 'master'

policy.ANSWER: minor fixes, mainly around NODATA answers

See merge request knot/knot-resolver!1129

4 years agodoc: fix a tiny typo
Vladimír Čunát [Mon, 8 Feb 2021 13:34:05 +0000 (14:34 +0100)] 
doc: fix a tiny typo

Reported on:
https://gitter.im/CZ-NIC/knot-resolver?at=60213c720eed905f189da4d7

4 years agopolicy.ANSWER: minor fixes, mainly around NODATA answers
Vladimír Čunát [Thu, 28 Jan 2021 10:37:05 +0000 (11:37 +0100)] 
policy.ANSWER: minor fixes, mainly around NODATA answers

- return SOA in NODATA answers and allow customizing it
- only call ensure_answer() if really generating an answer
  (otherwise we might e.g. deplete XDP buffers, in extreme cases)

4 years agoMerge !1133: packaging: link to Arch Linux package
Vladimír Čunát [Mon, 8 Feb 2021 08:55:51 +0000 (09:55 +0100)] 
Merge !1133: packaging: link to Arch Linux package

4 years agopackaging: link to Arch Linux package
Tomas Krizek [Fri, 5 Feb 2021 17:22:31 +0000 (18:22 +0100)] 
packaging: link to Arch Linux package

Arch Linux now ships knot-resolver in their repositories, delete
reference to AUR.

Thanks to daurnimator who adopted the package!

4 years agoMerge branch 'modules-docs' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1436 obs-knot-dns-deve-jq0xxt/deployments/1437 obs-knot-dns-deve-jq0xxt/deployments/1439 obs-knot-dns-deve-jq0xxt/deployments/1441 obs-knot-resolver-bs4hbr/deployments/1435 obs-knot-resolver-bs4hbr/deployments/1438 obs-knot-resolver-bs4hbr/deployments/1440 obs-knot-resolver-bs4hbr/deployments/1442
Tomas Krizek [Thu, 4 Feb 2021 14:24:41 +0000 (15:24 +0100)] 
Merge branch 'modules-docs' into 'master'

minor module docs fixes

See merge request knot/knot-resolver!1131

4 years agomodules/stats: fix README mistake in .set()
Vladimír Čunát [Thu, 4 Feb 2021 09:37:42 +0000 (10:37 +0100)] 
modules/stats: fix README mistake in .set()

Reported on:
https://gitter.im/CZ-NIC/knot-resolver?at=601ae90e9fa6765ef8f6b408

4 years agomodules/prefill: fix README typo
Vladimír Čunát [Thu, 4 Feb 2021 09:08:29 +0000 (10:08 +0100)] 
modules/prefill: fix README typo

(and regularize indentation)  Reported on:
https://gitter.im/CZ-NIC/knot-resolver?at=601b36f6aa6a6f319d0235f5

4 years agoMerge !1130: when FORMERR comes, differentiate based on OPT obs-knot-dns-deve-jq0xxt/deployments/1431 obs-knot-dns-deve-jq0xxt/deployments/1434 obs-knot-resolver-bs4hbr/deployments/1432 obs-knot-resolver-bs4hbr/deployments/1433
Vladimír Čunát [Tue, 2 Feb 2021 19:15:09 +0000 (20:15 +0100)] 
Merge !1130: when FORMERR comes, differentiate based on OPT

4 years agowhen FORMERR comes, differentiate based on OPT
Vladimír Čunát [Mon, 1 Feb 2021 09:09:16 +0000 (10:09 +0100)] 
when FORMERR comes, differentiate based on OPT

In particular, non-support of EDNS is implied iff FORMERR without OPT
comes.  If OPT is there, one possibility is that there was something
wrong in the OPT that *we* sent, but it seems much more likely that
this particular server is just bad and we want to try another one.
https://tools.ietf.org/html/rfc6891#section-7
In particular, we would be in trouble if we dropped OPT in a zone
that is covered by DNSSEC.

4 years agolib/selection: rename to *_FORMERR for consistency
Vladimír Čunát [Mon, 1 Feb 2021 08:57:46 +0000 (09:57 +0100)] 
lib/selection: rename to *_FORMERR for consistency

It's now consistent with KNOT_RCODE_FORMERR and the official name
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6

4 years agoMerge !1128: remove NO_THROTTLE option obs-knot-dns-deve-jq0xxt/deployments/1421 obs-knot-dns-deve-jq0xxt/deployments/1424 obs-knot-dns-deve-jq0xxt/deployments/1425 obs-knot-dns-deve-jq0xxt/deployments/1428 obs-knot-dns-deve-jq0xxt/deployments/1429 obs-knot-resolver-bs4hbr/deployments/1422 obs-knot-resolver-bs4hbr/deployments/1423 obs-knot-resolver-bs4hbr/deployments/1426 obs-knot-resolver-bs4hbr/deployments/1427 obs-knot-resolver-bs4hbr/deployments/1430
Vladimír Čunát [Thu, 28 Jan 2021 14:38:56 +0000 (15:38 +0100)] 
Merge !1128: remove NO_THROTTLE option

4 years agoremove NO_THROTTLE option
Štěpán Balážik [Wed, 20 Jan 2021 11:48:45 +0000 (12:48 +0100)] 
remove NO_THROTTLE option

It wasn't really used for a long time and became completely obsolete after
!1030.

4 years agoMerge branch 'remove-safemode' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1420 obs-knot-resolver-bs4hbr/deployments/1419
Štěpán Balážik [Wed, 27 Jan 2021 11:25:55 +0000 (12:25 +0100)] 
Merge branch 'remove-safemode' into 'master'

Rework iterate.c/selection.c error handling

Closes #640

See merge request knot/knot-resolver!1126

4 years agomention MR in NEWS
Štěpán Balážik [Wed, 27 Jan 2021 11:23:48 +0000 (12:23 +0100)] 
mention MR in NEWS

4 years agolib/selection: refactor kr_selection_error_str()
Vladimír Čunát [Tue, 26 Jan 2021 11:25:09 +0000 (12:25 +0100)] 
lib/selection: refactor kr_selection_error_str()

This way leaves less room for mistakes, etc.  It's just the idea from:
https://gitlab.nic.cz/knot/knot-resolver/-/commit/dd0c99bdb6332ba3628833a8543a5f9f33141ddd#note_191580

4 years agoiterate.c: clarify is_authoritative workaround comment 75416
Štěpán Balážik [Mon, 25 Jan 2021 08:48:57 +0000 (09:48 +0100)] 
iterate.c: clarify is_authoritative workaround comment

4 years agoselection: only report RTT if there is an answer
Štěpán Balážik [Fri, 22 Jan 2021 18:22:20 +0000 (19:22 +0100)] 
selection: only report RTT if there is an answer

Previously this would pollute the RTT cache with non-sensical
measurements from unsuccessful TCP connects for example.

4 years agomodules/rebinding: fix module logging to new server selection
Štěpán Balážik [Mon, 25 Jan 2021 09:40:13 +0000 (10:40 +0100)] 
modules/rebinding: fix module logging to new server selection

Module would crash due to the change of `request->upstream`
structure.

4 years agoselection_iter: relax NSNXAttack mitigation
Štěpán Balážik [Wed, 20 Jan 2021 18:33:14 +0000 (19:33 +0100)] 
selection_iter: relax NSNXAttack mitigation

Previously the mitigation would stop some longer benign resolutions.
We can safely zero the subquery counter when choose a concrete transport
for the query (i.e. NS name with known IP address).

4 years agoselection: force resolution of new NS name after lame delegation
Štěpán Balážik [Wed, 20 Jan 2021 15:19:18 +0000 (16:19 +0100)] 
selection: force resolution of new NS name after lame delegation

Lame delegations are weird, they breed more lame delegations on broken
zones since trying another server from the same set usualy doesn't help.
We force resolution of another NS name in hope of getting somewhere.

4 years agoiterate: interpret empty FORMERR answers correctly
Štěpán Balážik [Wed, 20 Jan 2021 10:12:12 +0000 (11:12 +0100)] 
iterate: interpret empty FORMERR answers correctly

Previously a 12B reply with FORMERR would be treated as malformed
creating a need for a workaround (switching off EDNS for every malformed
answer).

4 years agobogus_log: fix bogus_log test to new error handling
Štěpán Balážik [Tue, 19 Jan 2021 16:03:51 +0000 (17:03 +0100)] 
bogus_log: fix bogus_log test to new error handling

4 years agoresolve.c: trigger serve stale on NSNXAttack mitigation from kr_resolve_consume
Štěpán Balážik [Tue, 19 Jan 2021 15:08:22 +0000 (16:08 +0100)] 
resolve.c: trigger serve stale on NSNXAttack mitigation from kr_resolve_consume

4 years agoiterate.c: don't copy NO_MINIMIZE when following a CNAME
Štěpán Balážik [Tue, 19 Jan 2021 12:39:04 +0000 (13:39 +0100)] 
iterate.c: don't copy NO_MINIMIZE when following a CNAME

Instead copy it from the request's options.

Reasoning: Minimization might have been turned off as a workaround for
broken authoritative servers which doesn't support it. There is no
reason to drop minimization when switching zones when following a CNAME.

4 years agoselection: fix DNSSEC_BOGUS/NSNXAttack mitigation interaction
Štěpán Balážik [Thu, 14 Jan 2021 23:49:38 +0000 (00:49 +0100)] 
selection: fix DNSSEC_BOGUS/NSNXAttack mitigation interaction

When cancelling a query due to NSNXAttack mitigation when validator was
also in BOGUS state, records wouldn't be stripped from the answer.

4 years agoselection: better error messages for errors
Štěpán Balážik [Thu, 14 Jan 2021 19:09:38 +0000 (20:09 +0100)] 
selection: better error messages for errors

4 years agoselection: minor fixes in commented code
Štěpán Balážik [Thu, 14 Jan 2021 17:32:43 +0000 (18:32 +0100)] 
selection: minor fixes in commented code

These will become useful once we actually use it…

4 years agoiterate: rework error handling from iterate.c
Štěpán Balážik [Thu, 14 Jan 2021 14:39:31 +0000 (15:39 +0100)] 
iterate: rework error handling from iterate.c

Previously there where resolve_badmsg and resolve_error functions used
to apply workarounds. This is now moved to selection.c and iterate.c
just provides feedback using the server selection API. Errors are now
handled centrally in selection.c:error.

4 years agoMerge branch 'ci-scan-build' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1401 obs-knot-dns-deve-jq0xxt/deployments/1403 obs-knot-dns-deve-jq0xxt/deployments/1405 obs-knot-dns-deve-jq0xxt/deployments/1408 obs-knot-dns-deve-jq0xxt/deployments/1409 obs-knot-dns-deve-jq0xxt/deployments/1411 obs-knot-dns-deve-jq0xxt/deployments/1413 obs-knot-dns-deve-jq0xxt/deployments/1416 obs-knot-dns-deve-jq0xxt/deployments/1418 obs-knot-resolver-bs4hbr/deployments/1402 obs-knot-resolver-bs4hbr/deployments/1404 obs-knot-resolver-bs4hbr/deployments/1406 obs-knot-resolver-bs4hbr/deployments/1407 obs-knot-resolver-bs4hbr/deployments/1410 obs-knot-resolver-bs4hbr/deployments/1412 obs-knot-resolver-bs4hbr/deployments/1414 obs-knot-resolver-bs4hbr/deployments/1415 obs-knot-resolver-bs4hbr/deployments/1417
Tomas Krizek [Mon, 18 Jan 2021 09:52:18 +0000 (10:52 +0100)] 
Merge branch 'ci-scan-build' into 'master'

ci lint:scan-build: work around changes in meson

See merge request knot/knot-resolver!1127

4 years agoci lint:scan-build: work around changes in meson
Vladimír Čunát [Mon, 18 Jan 2021 08:16:52 +0000 (09:16 +0100)] 
ci lint:scan-build: work around changes in meson

In 1f7678ea24 meson was updated and that broke our scan-build.
Now we work around that.  Quick analysis of why:
https://github.com/mesonbuild/meson/pull/5918#issuecomment-762064902

4 years agoMerge branch 'dnstap-tests' into 'master' obs-knot-dns-deve-jq0xxt/deployments/1396 obs-knot-dns-deve-jq0xxt/deployments/1398 obs-knot-dns-deve-jq0xxt/deployments/1400 obs-knot-resolver-bs4hbr/deployments/1395 obs-knot-resolver-bs4hbr/deployments/1397 obs-knot-resolver-bs4hbr/deployments/1399
Tomas Krizek [Fri, 15 Jan 2021 14:22:31 +0000 (15:22 +0100)] 
Merge branch 'dnstap-tests' into 'master'

dnstap tests: integrate into meson, CI, etc.

See merge request knot/knot-resolver!1123

4 years agomeson: utilize test priority with sufficiently new meson 74870
Vladimír Čunát [Fri, 15 Jan 2021 13:45:40 +0000 (14:45 +0100)] 
meson: utilize test priority with sufficiently new meson

+ it's more efficient to schedule longer tests before shorter tests
- we get a warning (if meson is new enough to use priorities)

Priority numbers: I took the config tests as baseline.
I didn't touch tests with "is_parallel: false".

4 years agotests/dnstap: fix, refactor and integrate into meson and CI
Vladimír Čunát [Tue, 5 Jan 2021 15:59:48 +0000 (16:59 +0100)] 
tests/dnstap: fix, refactor and integrate into meson and CI

They need one go package which I can't find even in Debian,
so it probably can't work without network access.
The new dnstap in extra_tests runs if dnstap is built and go is found.
It also tries to keep the source tree clean.

Now both query and reply messages are tested.

In CI (after caching go deps in image) this tests only takes slightly
more time than the longest config.* tests, so that seems OK.
Even so, it's not added into the valgrind variant, as compilation
of the test still isn't split away from the run itself.

4 years agoci/debian-buster: add deps for dnstap in kresd
Vladimír Čunát [Tue, 5 Jan 2021 11:15:04 +0000 (12:15 +0100)] 
ci/debian-buster: add deps for dnstap in kresd

From distro packages, just libprotobuf-c-dev and golang-any are new,
but I also broke the overlong line and reorganized its contents a bit.

4 years agoMerge branch 'dnstap-pkg' into 'master'
Tomas Krizek [Fri, 15 Jan 2021 13:51:34 +0000 (14:51 +0100)] 
Merge branch 'dnstap-pkg' into 'master'

add dnstap subpackage

Closes #655

See merge request knot/knot-resolver!1118

4 years agodistro/tests: add dnstap test
Jakub Ružička [Wed, 6 Jan 2021 16:58:40 +0000 (17:58 +0100)] 
distro/tests: add dnstap test