Vladimír Čunát [Thu, 22 Nov 2018 15:15:06 +0000 (16:15 +0100)]
QRVERBOSE: move more code into a function, add docs
There's only very little that makes sense to "inline".
My understanding that it makes sense to have such heavier
optimization only for the case when no verbose logging is done.
This might actually help due to decreasing code size.
Vladimír Čunát [Thu, 22 Nov 2018 14:11:37 +0000 (15:11 +0100)]
QRVERBOSE: avoid a -Wpedantic warning
It's about a hundred of them. The price is making two printf calls
instead of one. That seems acceptable; these warning tools can help us
in future, and the likelihood of mixing outputs from different processes
seems relatively small.
Marek Vavruša [Fri, 27 Apr 2018 06:21:31 +0000 (23:21 -0700)]
daemon/worker: move checkout layer before connect, catch checkout errors
The checkout layer was moved to where upstream address is known, but
before outbound message is sent (or connected to upstream).
The reason is to allow checkout layer to block outbound queries
without wasting time waiting for connect.
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