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.
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)
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.
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.
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.
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.
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.
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.
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.
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)
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.
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)
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
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.)
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.
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.