Marek Vavruša [Fri, 2 Oct 2015 11:40:37 +0000 (13:40 +0200)]
build: `make CFLAGS=...` and `CFLAGS=... make` are identical
same for LDFLAGS. this fixes common problem where CFLAGS after make
was evaluated as a make variable and replaced the default, while
before as env variable and was prepended to the default string.
now they both behave as an env. variable
Marek Vavruša [Thu, 1 Oct 2015 14:55:22 +0000 (16:55 +0200)]
lib/zonecut: use SBELT only when necessary, prefer cached information
before the algorithm was happy with root hints for all queries starting
at root, however they're often overloaded and result in timeouts
the updated code provides SBELT only for root NS query lookup and tries
to use cached information as much as possible
Marek Vavruša [Sun, 27 Sep 2015 22:00:44 +0000 (00:00 +0200)]
daemon/lua: bindings for packet sections and data
example:
local rr = pkt:section(kres.section.ANSWER)
for i = 1, #rr do
if rr[i].type == kres.type.A then
print(kres.dname2str(rr[i].owner))
print(‘rdlen:’, #rr[i].rdata)
end
end
Marek Vavruša [Sun, 27 Sep 2015 21:55:50 +0000 (23:55 +0200)]
daemon: added ‘net.bufsize’ option for max UDP payload
sets maximum UDP/EDNS payload within <1220, 65535>
the default is max unfragmented UDP packet, but it’s
possible to set it higher if the network supports it to avoid
TCP retransmits
Marek Vavruša [Thu, 24 Sep 2015 12:12:47 +0000 (14:12 +0200)]
daemon/config: cache open by default (even if not in config)
before the cache was disabled by default, but this has led to many user
errors (mine as well). this enables it by default (which is what most
people want anyway)
Marek Vavruša [Thu, 24 Sep 2015 09:42:34 +0000 (11:42 +0200)]
rrcache: disabled parent-child diff tests where parent is right
until RFC2181 credibility is implemented in cache, this behavior breaks
DNSSEC as the parent-side comes first to the cache
disabled this behavior until implemented properly
Marek Vavruša [Tue, 22 Sep 2015 15:31:07 +0000 (17:31 +0200)]
lib/validate: DNSKEY answers from resolver cache do not trigger requery
a cache is consulted before we even know a zone cut for the query, thus
the DNSKEY can't be validated. as a policy, everything should be
validated before it's accepted into cache, then it's trusted and
shouldn't be rechecked
Marek Vavruša [Tue, 22 Sep 2015 09:16:09 +0000 (11:16 +0200)]
lib: proper key/ta checks in zone cut resolution
this fixes problems with servers authoritative both for
parent and child zone and vice versa
as the DS is authoritative parent-side, a full subrequest
is launched. this breaks some tests that don’t have
a full referral path
todo bugs:
- non-existence proof with only SOA and no NS is not
correctly resolved
- revalidation in some cases causes record duplication
- NS queries with DO=1 answered from cache are not correctly resolved, as the TA is not set at this time
Marek Vavruša [Mon, 21 Sep 2015 07:17:21 +0000 (09:17 +0200)]
lib: saner TA store, in Lua module ‘trust_anchors’
preparations for TA rotation and management
in config:
trust_anchors.file = ‘root.key’
trust_anchors.auto = true // NOTIMPL
trust_anchors.add(‘. IN DS …’) // Manual addition
as per rfc4035 all secured referrals must have either DS or proof
of non-existence. there is one use case where the resolver doesn’t
learn a DS this way, when a single server hosts both parent and
child zone. in this case, DS must be requested separetely
Marek Vavruša [Sat, 19 Sep 2015 19:30:20 +0000 (21:30 +0200)]
lib/validate: fixed revalidation of cached answers
also answers for which minimisation failed or truncated
are fixed, for such answers iterator sets state to ‘consume’
to indicate the answer wasn’t processed
Marek Vavruša [Sat, 19 Sep 2015 19:22:12 +0000 (21:22 +0200)]
lib: per-query islands of trust, prep for NTA
each subrequest can now enter and leave islands of trust
independently. this fixes a case when a zone is in an
island of trust, but one of its NS isn’t (different zone for example)
Marek Vavruša [Fri, 18 Sep 2015 20:10:56 +0000 (22:10 +0200)]
tests: need brewed Python on 10.11, cleanup
the SIP on OSX 10.11 disables library injection
on system binaries (python is considered as it)
make needs to call python binary directly to allow
brewed python to be used