Marek Vavruša [Mon, 5 Oct 2015 17:17:43 +0000 (19:17 +0200)]
cachectl: querying/subtree deletion
- can query cache for records
- can remove only domain or subtree from cache
- can remove data in packet cache or other prefixes
- cache clear also reset NS reputation tracking
Marek Vavruša [Mon, 5 Oct 2015 16:25:49 +0000 (18:25 +0200)]
lib/cache: key format change, code to check versions
the key is now stored in a format friendly to prefix search, the values
also contain one more 16bit field to store rank of the data (to be
utilised later)
Marek Vavruša [Sat, 3 Oct 2015 22:03:12 +0000 (00:03 +0200)]
lib/iterate: do not follow CNAME targets outside cut
this is a problem when both CNAME and the target are answered from the same NS (but different authority), but only the CNAME authority does DNSSEC. it’s probably legal, but it’s pretty stupid to do so
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