Anbang Wen [Tue, 14 Aug 2018 23:10:10 +0000 (16:10 -0700)]
support multiple addresses in daf src/dst filter
This enables using syntax like "src { CIDR-a CIDR-b } deny" to specify
multiple addresses to filter. All the conditions are ORed together
like qname/ns.
Marek Vavruša [Thu, 31 May 2018 02:06:22 +0000 (19:06 -0700)]
modules/policy: fixed NYIs (vararg function call)
* fixed NYI with vararg calls in policy filter
* fixed NYI with nil returns (incompatible with type pointer returned otherwise)
* fixed tail call returns exceeding trace loop counts
Marek Vavruša [Fri, 27 Apr 2018 06:27:33 +0000 (23:27 -0700)]
modules/daf,renumber: fixed the modules and added tests
This fixes most of the rules in DAF that were broken in 2.0 and adds tests.
It also allows policy filter to evaluate policies in the checkout layer,
before the subrequest is sent to authoritative. This is used primarily for
negotiating features between resolver and authoritatives, or disabling transports.
The policy filter can now match on:
* NS suffix - to apply policies on any zone on given nameservers
* Query type
New actions:
* REFUSE - block query with an RCODE=REFUSED, fixes #337
The DAF can now toggle features between resolver and authoritatives.
Grigorii Demidov [Thu, 15 Nov 2018 13:29:55 +0000 (14:29 +0100)]
daemon TLS: increase wire-buffer size
When decoding large packets, gnutls gives the application chunks
of size 16kb. So that tls session wirebuffer must be at least
KNOT_WIRE_MAX_PKTSIZE + 16kb. (message re-formatted by vcunat)
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.