Marek Vavruša [Sat, 5 Dec 2015 17:09:23 +0000 (18:09 +0100)]
daemon: root trust anchors automatically bootstrapped from IANA
if the root key file doesn’t exist, it will be populated from root DNSKEY query, which will be validated against root trust anchors retrieved over HTTPS with IANA cert verification against built-in current IANA cert CA. it requires luasocket and luasec for it to work. trust anchors XML file signature is not checked, as there’s no facility for PKCS7 checking yet.
Marek Vavruša [Thu, 3 Dec 2015 13:54:30 +0000 (14:54 +0100)]
lib/resolve: penalize failing NSs
any answer that is considered as malformed/servfail/otherwise bad
penalizes the NS for the next time like timeout, this doesn't apply for
DNSSEC validation failures as it still may be okay for insecure
resolution. EDNS failures are okay because the server is requeried in
the most simple RFC1035 mode before flagging it as failed
this avoids instant requeries for SERVFAILing resolutions
Marek Vavruša [Thu, 3 Dec 2015 12:55:04 +0000 (13:55 +0100)]
lib/zonecut: do not fetch DS/DNSKEY for cached insecure delegations
when a delegation is provably insecure, it is flagged as INSECURE in
cache (this is different from "unchecked"), when the next query finds
the same zone cut, this information is retrieved and if it was proved to
be insecure before, this status is reused
this prevents refetching of NS/DNSKEY in some situations
Marek Vavruša [Fri, 27 Nov 2015 00:28:54 +0000 (01:28 +0100)]
daemon/engine: relax cache syncing strategy
this doesn’t guarantee valid cache after crash,
but then it’s a cache. most of the time on cold
cache is spent on fsyncing as it’s done per each
commit (=> resolved query)
Marek Vavruša [Wed, 25 Nov 2015 09:19:40 +0000 (10:19 +0100)]
build: amalgamated build support with AMALG=1
amalgamated build concatenates all files into a single .c file to
allow compiler see all symbols and produce possibly smaller code.
for binary distributions this is what you want, as it's faster but
may consume more memory during compilation.
it however cannot do incremental builds.
Marek Vavruša [Tue, 24 Nov 2015 19:00:11 +0000 (20:00 +0100)]
lib/nsrep: do not penalize name failures, no empty NSLIST leaders
if the NSLIST already has a candidate with addresses, never replace
current leader with an empty one. otherwise if the former leader address
was tried and failed, new empty leader would be blamed for this and
penalized
Marek Vavruša [Wed, 18 Nov 2015 16:12:47 +0000 (17:12 +0100)]
lib/resolve: root zone is always encloser
bad control flow, the zone cut should be checked for root, as the second
condition checks if SNAME is at/below cut so the outcome is the same for
root query
Marek Vavruša [Thu, 12 Nov 2015 18:16:18 +0000 (19:16 +0100)]
daemon: fast retransmit address selection
instead of single I/O request per step, the daemon now retries
all addresses in the selection with 300ms timeout between tries.
there are len(list) + len(list)/2 tries
the idea is to reduce latency when UDP request doesn't punch through,
or some NSs are overwhelmed/faulty
Marek Vavruša [Fri, 13 Nov 2015 14:55:12 +0000 (15:55 +0100)]
lib/iterate: always copy to final answer
RRs may be touched after resolution completion, this copies RR from
temporary per-recv buffer to answer, which is persistent for the whole
duration of request
Marek Vavruša [Fri, 13 Nov 2015 12:42:55 +0000 (13:42 +0100)]
lib/daemon: address sanitizer annotated poisoning
if the library or daemon is compiled with address sanitizer, objects in
freelists are poisoned to detect use-after-recycle errors
it is not currently used in the library, as there are no freelists