summaryrefslogtreecommitdiffstats
path: root/lib/zonecut.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* treewide: more compatibility with future libknot 3.4Vladimír Čunát2024-05-061-1/+1
| | | | knot_wire_next_label isn't allowed with NULL wire anymore.
* lib/zonecut.c fetch_addr(): resurrect filtering by NO_IPV*Vladimír Čunát2023-11-031-2/+5
| | | | | | | | | | | | | | | This filtering was dropped in 4565cc596680 (v5.3.0). Now it's reintroduced - but inside the function, as that seems nicer. Nit: naming and comment were updated to fit the current usage. As the code is designed so far (in whole history probably), in order to detect whether we need to choose a zone cut closer to the root, we need to do something like this in lib/zonecut.c already, instead of just during server selection. I don't think this change can break anything. Fetching unusable addresses from cache seems pointless, as selection wouldn't be allowed to use them or try resolving them.
* Copyright notices: remove years and replace e-mailOto Šťáva2022-12-141-1/+1
|
* lib/zonecut + iterator: limit large NS setsVladimír Čunát2022-09-161-2/+35
| | | | | It's a mitigation for CVE-2022-40188 and similar DoS attempts. It's using really trivial approaches, at least for now.
* drop unused #include linesVladimír Čunát2022-06-031-1/+0
| | | | | | https://clangd.llvm.org/design/include-cleaner Though somehow I'm all the time getting false positives for "daemon/bindings/impl.h"
* replace some occurrences of abort() by kr_require()Vladimír Čunát2022-06-031-2/+2
| | | | | It provides more information and the condition is typically easier to read, too.
* logging: remove QVERBOSE in favor of kr_log_qTomas Krizek2021-12-211-1/+1
|
* treewide: replace VERBOSE_STATUS, WITH_VERBOSE, etc.Vladimír Čunát2021-07-291-4/+4
| | | | | | | | | The main problem there was ignoring the log groups, and VERBOSE_STATUS also ignores trace-logging. Typically the new kr_log_is_debug*() are the best choice. In a couple places with heavy WITH_VERBOSE usage it's instead locally redefined to consider the right group.
* log: shortening LOG_GRP_<SOMETHING> to <SOMETHING>Lukáš Ježek2021-07-291-1/+1
|
* log: add level prefix to each messageLukáš Ježek2021-07-291-1/+1
|
* treewide: rename assumptions to kr_assert() / kr_fails_assert()Tomas Krizek2021-05-251-10/+10
| | | | | | | | | | | | | To (hopefully) improve readability, rename the typical macro usage of: if (!kr_assume(x)) y; // to if (kr_fails_assert(x)) y; As a convenience, replace the assert without a return value to a more simple version: (void)!kr_assume(x); // becomes kr_assert(x);
* lib/zonecut.c: replace assertsTomas Krizek2021-05-251-29/+17
|
* bump required Knot DNS version to 2.9Tomas Krizek2021-02-111-1/+1
|
* selection: server selection rewriteŠtěpán Balážik2020-12-311-20/+5
| | | | | Design discussion: #447 Code discussion: !1030
* treewide: machine readable license for GNU GPLv3+ source codePetr Špaček2020-02-251-13/+1
| | | | | Long GNU GPLv3 boilderplate was automatically replaced with machine readable tag.
* add compatibility with libknot 2.9Vladimír Čunát2019-09-201-1/+1
| | | | | It's fairly easy to keep keep compatible with both 2.8 and 2.9, so I'd go for that for now, as it may be practical.
* cache: rename kr_cache_sync -> kr_cache_commitPetr Špaček2019-03-061-1/+1
| | | | | Function originally called kr_cache_sync() was in fact responsible for calling mdb_txn_commit() and not mdb_env_sync() which was confusing.
* treewide nitpick: fix -WshadowVladimír Čunát2019-01-081-3/+3
| | | | None of these seemed to be errors, but it seems better to clear these.
* treewide: use more standard variadic macrosVladimír Čunát2018-11-261-1/+1
| | | | | There's still an unresolved "problem" with QRVERBOSE getting empty variadic list sometimes, and I can't see a good way around that.
* zonecut, treewide: remove incorrect arrays of knot_rdata_tVladimír Čunát2018-11-261-12/+12
| | | | | To simplify this, some of the zonecut API was generalized (API+ABI break). Detected by -Wpedantic.
* kr_zonecut_move(): new functionVladimír Čunát2018-11-211-0/+7
| | | | | It's more efficient for some our use cases, and hopefully also more idiomatic.
* lib/zonecut: verbose output tweaksVladimír Čunát2018-11-021-1/+14
|
* various nitpicks around the parent commitVladimír Čunát2018-11-021-27/+27
|
* lib/zonecut: avoid one kind of NS dependency cyclesVladimír Čunát2018-11-021-19/+128
| | | | | | | | | The problem here was that we need to know which addresses are timed-out (and not to be re-probed) much earlier than we do NS selection ATM - that's because under some circumstances it affects the depth of NS zone cut that we choose, i.e. if all addresses in a certain zone cut are "bad" in a certain sense, we need to use a zone cut closer to the root, because otherwise we'd get into a dependency cycle.
* iterate, nsrep: more resiliency to possible errorsVladimír Čunát2018-08-141-0/+8
|
* removal of pos from parametersVladimír Čunát2018-08-141-2/+4
|
* knot_rdataset_t field renamesVladimír Čunát2018-08-141-3/+3
|
* *_free() fixupsVladimír Čunát2018-08-141-9/+8
|
* knot_rdata_* changesVladimír Čunát2018-08-141-7/+5
| | | | The _t isn't uint8_t* anymore but a structure with .len and .data.
* TTL changes: moved in libknot from rdata to rrsetVladimír Čunát2018-08-141-5/+7
| | | | To work on RRSIG TTLs, libknot >= 2.7.1 is needed.
* simple include fixesVladimír Čunát2018-08-141-1/+0
| | | | | - <dnssec/**> -> <libdnssec/**> - <zscanner/**> -> <libzscanner/**>
* improve verbose logsMarek Vavruša2018-05-161-2/+2
|
* check per-query flags instead of global options, getter for NS nameMarek Vavruša2018-04-231-2/+2
| | | | | | Checking query flags instead of global context option allows setting overrides on individual queries. The effect is the same as query flags start by copying request flags which start by copying context options.
* struct kr_zonecut::nsset: migrate from map_t to trie_tVladimír Čunát2018-04-121-95/+80
|
* lib/zonecut: nitpicks in kr_zonecut_has_glue()Vladimír Čunát2018-04-061-1/+3
|
* lib/zonecut: get rid off incorrect function nameGrigorii Demidov2018-04-061-3/+3
|
* lib/resolve: cut fetching: don't use root hints if no keys fetched, but glue ↵Grigorii Demidov2018-04-061-0/+28
| | | | addresses found
* map_t, set_t: unify memory allocation to mm_*Vladimír Čunát2018-03-011-4/+1
| | | | | | We use the knot style everywhere else; this was very similar and yet different, so really annoying to me. In the long term we might better migrate to qp-tries from knot, but the API differs, so it's delayed...
* nitpicks around zone cut searchingVladimír Čunát2018-02-201-6/+10
| | | | It's mostly just --verbose logging adjustments.
* avoid iterating from a too short zone cutVladimír Čunát2018-02-201-4/+6
| | | | | | | | | Example: after foo.sk query the bar.sk query started iterating from asking the root again for NS sk. This bug was present on insecure zones, and before version 2.0.0 only such that have a secure parent. (These two parts of the bug correspond to the two changes in this commit.) Fixes https://gitlab.labs.nic.cz/knot/knot-resolver/issues/246
* reduce verbosity of cache-related logsVladimír Čunát2018-01-251-2/+2
| | | | It was just too noisy for default --verbose.
* cache: fix logging after parent mergeVladimír Čunát2018-01-251-3/+7
|
* fixup! treewide: safer structure literals and initializationVladimír Čunát2018-01-181-4/+4
|
* cache: basic preparation for stale-servingVladimír Čunát2018-01-151-13/+17
|
* remove some old codeVladimír Čunát2017-11-101-5/+3
|
* fix clang warningsVladimír Čunát2017-11-101-1/+0
|
* .Vladimír Čunát2017-10-171-3/+9
| | | | | | | | Positive caching seems usable now. (No xNAME, wildcards, etc.) Problem around zone cuts: - clear cache - kdig fubar - kdig DNSKEY cz
* .Vladimír Čunát2017-10-131-30/+42
|
* nitpick: unused-variable since !367 (cac9e018c3)Vladimír Čunát2017-09-211-2/+0
|
* Merge !367: roothints: load from zonefileVladimír Čunát2017-09-191-53/+0
|\