Ideally, we'll just use the datestamp in the first line of NEWS directly.
if we can't find that, then fall back to the timestamp of the file
(which might be different on different machines because of how git
applies updates). In any event, choose the datestamp using UTC, to
avoid building a different kresd.8 depending on the TZ of the machine.
Vladimír Čunát [Thu, 15 Nov 2018 12:46:51 +0000 (13:46 +0100)]
CI: update clang tools for lint:*
In particular, in .gitlab-ci.yml I see no reason to hard-code
the version of clang tools - it seems easier to control that
only when generating the image.
Vladimír Čunát [Wed, 14 Nov 2018 13:40:39 +0000 (14:40 +0100)]
modules/nsid: fix linkage on some systems
This is my mistake. I was convinced this line wasn't needed
and I deleted it before merging the module.
Apparently we still have some deficiencies in the build system,
but let's defer that to migration (to meson probably).
Tomas Krizek [Tue, 6 Nov 2018 14:32:57 +0000 (15:32 +0100)]
Dockerfile: update image
- building different version of kresd is not properly supported
(uses current directory with checked-out code instead of git master)
- based on debian:stable instead of alpine for easier dependency
resolution
- moved both Dockerfile and config to more appropriate locations
Marek Vavruša [Mon, 2 Apr 2018 23:42:42 +0000 (16:42 -0700)]
modules/http: added an error handler to HTTP streams
Instead of throwing an error in the HTTP handler, server should log it.
This covers errors like client disconnecting before reading the response
body etc.
Vladimír Čunát [Wed, 17 Oct 2018 17:00:53 +0000 (19:00 +0200)]
lib/zonecut: avoid one kind of NS dependency cycles
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.
Vladimír Čunát [Fri, 2 Nov 2018 11:30:32 +0000 (12:30 +0100)]
lib/generic/queue: remove a ssize_t cast
The Alpine-based Docker image wouldn't compile.
I can't see a reason for the cast now - it's a sum of compile-time
constants, and very unlikely to overflow on changes in code or platform.
Vladimír Čunát [Tue, 11 Sep 2018 14:07:22 +0000 (16:07 +0200)]
kres.str2dname: perform lower-casing
We use it as relatively high-level function, often on user-input names,
so it seems suitable that it does convert the case.
This fixes cache.clear('Example.Org.'), and probably also negative trust
anchors and policy uses.
Vladimír Čunát [Fri, 12 Oct 2018 12:18:43 +0000 (14:18 +0200)]
docs for daemon: better visibility for control sockets
- promote the part into a section
- move it right after the section about interactive CLI
- minor reformulations, location of the sockets, etc.
- fix location of the daemon-supervised anchor
Grigorii Demidov [Mon, 22 Oct 2018 08:48:51 +0000 (10:48 +0200)]
daemon: TCP connection timeouting has changed; connection was closed after peer's inactivity before, now it is closed after incativity in both directions (peer->kresd, kresd->peer); prevents connection from closing before answer sent to client
Vladimír Čunát [Wed, 10 Oct 2018 15:00:07 +0000 (17:00 +0200)]
cache: avoid some crashes
It's actually possible to start queries without any cache open,
e.g. add `resolve('.', kres.type.DNSKEY)` into your configuration.
If that happens, avoid the cache module dereferencing a NULL pointer.
Vladimír Čunát [Wed, 19 Sep 2018 14:57:24 +0000 (16:57 +0200)]
trie_it nitpick: reduce the initial stack size
Using 2kB as start is a bit too much, and it was showing as 0.5% CPU
on malloc() called during trie_it_begin(). Let's start at 0.5 kB,
as it can grow anyway (only negligible in profile now).
Vladimír Čunát [Mon, 15 Oct 2018 13:08:38 +0000 (13:08 +0000)]
Merge !675: daemon: first part of refactoring
- mainly the daemon/session.* files are separated,
moving lots of logic from daemon/worker.*;
- lib/generic/queue.* are added;
- verbose logging gets different IDs;
- various minor changes around.
Vladimír Čunát [Thu, 4 Oct 2018 12:43:54 +0000 (14:43 +0200)]
daemon/session nitpick: avoid a warning
lint:clang-scan-build reported:
> warning: The code calls sizeof() on a pointer type.
> This can produce an unexpected result
but in our case it's intentional.
(Yes, using pointers as keys in trie isn't very pretty.)
Vladimír Čunát [Wed, 19 Sep 2018 18:50:29 +0000 (20:50 +0200)]
daemon nitpick cleanups
- Some (potentially) unused vars were left behind.
- The two on_* functions are identical except for the uv types passed,
and those are surely the same in the part we use, but it's not worth
to deduplicate when these functions are only two and so simple.
- lint:c was complaining about the uv_tcp_t malloc().