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.
Tomas Krizek [Fri, 2 Jul 2021 08:48:32 +0000 (10:48 +0200)]
daemon/worker: ensure HTTP headers are freed on ignored queries
Ignored queries never call create_request() where ownership of headers
is taken care of. They need to be explicitly cleared instead, because
we're the owners of the pointer here.
Vladimír Čunát [Wed, 28 Jul 2021 19:00:07 +0000 (21:00 +0200)]
lib/log.h: improve readability (hopefully)
* improve order
- follow grouping of topics more closely (targets, groups, levels)
- order kr_log_LEVEL by severity
* move unneeded <stdarg.h>
* improve doc-comments
- some claims there were even wrong now
- describe some log levels at kr_log_LEVEL
Vladimír Čunát [Wed, 28 Jul 2021 17:29:51 +0000 (19:29 +0200)]
lib/log level names: disregard SYSLOG_NAMES
It's a non-standard feature of syslog.h and I don't think it's worth
the trouble.
We didn't really utilize it; someone would have to #define it,
and moreover we would get into problems if this wasn't being done
the same on all places including log.h.
Making the names adapt to the platform would also mean that
config files and docs wouldn't be portable.
Vladimír Čunát [Wed, 28 Jul 2021 16:26:59 +0000 (18:26 +0200)]
lib/log.h nit: tweak macro for __LINE__
- we don't need doubling the layer in this case,
as the SD_JOURNAL_METADATA macro adds a layer already
- `TO_STR` was perhaps a too short name and could collide