]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
7 years agoMerge branch 'master' into cache-NSEC3
Vladimír Čunát [Thu, 10 May 2018 15:04:47 +0000 (17:04 +0200)] 
Merge branch 'master' into cache-NSEC3

7 years agowork around dnssec_nsec3_hash() doing realloc()
Vladimír Čunát [Thu, 10 May 2018 14:51:09 +0000 (16:51 +0200)] 
work around dnssec_nsec3_hash() doing realloc()

7 years ago.
Vladimír Čunát [Thu, 10 May 2018 14:25:40 +0000 (16:25 +0200)] 
.

- kill unused struct nsec_p, and have a new one, due to the libknot
  structure needing deallocation
- implement NODATA wildcard answers (not tested yet)
- remove unused parameters (cover_*_kwz)

7 years agoMerge branch 'augeas-ci' into 'master'
Petr Špaček [Thu, 10 May 2018 13:06:22 +0000 (15:06 +0200)] 
Merge branch 'augeas-ci' into 'master'

add augeas-tools so we can test our lens in Deckard

See merge request knot/knot-resolver!566

7 years agoadd augeas-tool so we can test our lens in Deckard
Stepan Balazik [Mon, 23 Apr 2018 11:29:18 +0000 (13:29 +0200)] 
add augeas-tool so we can test our lens in Deckard

7 years agoMerge branch 'udp-src-scheck' into 'master'
Petr Špaček [Thu, 10 May 2018 12:33:38 +0000 (14:33 +0200)] 
Merge branch 'udp-src-scheck' into 'master'

daemon: check source in udp answer

See merge request knot/knot-resolver!522

7 years agodaemon/worker: compare udp src ports as well as addresses; cleanup
Grigorii Demidov [Mon, 19 Mar 2018 14:59:02 +0000 (15:59 +0100)] 
daemon/worker: compare udp src ports as well as addresses; cleanup

7 years agodaemon: check source in udp answer
Grigorii Demidov [Wed, 14 Mar 2018 13:21:01 +0000 (14:21 +0100)] 
daemon: check source in udp answer

7 years agoMerge branch 'prefill_fix' into 'master'
Petr Špaček [Wed, 9 May 2018 16:54:51 +0000 (18:54 +0200)] 
Merge branch 'prefill_fix' into 'master'

prefill: fix ca_file to actually expect file and not a directory

See merge request knot/knot-resolver!578

7 years agoprefill: fix ca_file to actually expect file and not a directory
Petr Špaček [Wed, 9 May 2018 16:42:28 +0000 (18:42 +0200)] 
prefill: fix ca_file to actually expect file and not a directory

This was leftover from an old version which used directory with
certificates instead of bundle in single file.

Related: !511

7 years agoMerge branch 'nitpicks' into 'master'
Petr Špaček [Wed, 9 May 2018 15:11:30 +0000 (17:11 +0200)] 
Merge branch 'nitpicks' into 'master'

misc nitpicks

See merge request knot/knot-resolver!568

7 years agopolicy docs: replace incorrect example
Vladimír Čunát [Tue, 24 Apr 2018 14:14:29 +0000 (16:14 +0200)] 
policy docs: replace incorrect example

The example didn't work and I don't immediately see how to quickly fix
it, so let's have another more complex example instead (fished from an
older forum post of mine).

7 years agota_signal_query: correct logging
Vladimír Čunát [Fri, 13 Apr 2018 16:14:47 +0000 (18:14 +0200)] 
ta_signal_query: correct logging

7 years agodaemon docs: mention relation of hostname() and TLS
Vladimír Čunát [Mon, 16 Apr 2018 13:34:43 +0000 (15:34 +0200)] 
daemon docs: mention relation of hostname() and TLS

7 years agocache TTL limit nitpicks: allow equality, fix docs
Vladimír Čunát [Mon, 16 Apr 2018 13:32:54 +0000 (15:32 +0200)] 
cache TTL limit nitpicks: allow equality, fix docs

I also tried making a clickable define in the docs,
like for cache.ns_tout(), but I failed.

7 years agoMerge branch 'marek/add-lru-bindings' into 'master'
Petr Špaček [Wed, 9 May 2018 14:58:24 +0000 (16:58 +0200)] 
Merge branch 'marek/add-lru-bindings' into 'master'

daemon/lua: added basic bindings for LRU

See merge request knot/knot-resolver!569

7 years agodaemon/lua: added basic bindings for LRU
Marek Vavruša [Tue, 24 Apr 2018 02:05:30 +0000 (19:05 -0700)] 
daemon/lua: added basic bindings for LRU

Only get-set operations are added, added some tests.

7 years agoMerge branch 'tls-inv-session' into 'master'
Petr Špaček [Wed, 9 May 2018 14:48:52 +0000 (16:48 +0200)] 
Merge branch 'tls-inv-session' into 'master'

daemon/worker: improved server-side error handling

See merge request knot/knot-resolver!574

7 years agodaemon/worker: improved server-side error handling
Grigorii Demidov [Fri, 27 Apr 2018 11:54:21 +0000 (13:54 +0200)] 
daemon/worker: improved server-side error handling

7 years agoMerge branch 'tcp-leaks' into 'master'
Petr Špaček [Wed, 9 May 2018 12:56:21 +0000 (14:56 +0200)] 
Merge branch 'tcp-leaks' into 'master'

daemon/worker: orphaned tasks prevention

See merge request knot/knot-resolver!570

7 years agofix positive NSEC3 wildcards not always being answered
Vladimír Čunát [Mon, 7 May 2018 14:38:57 +0000 (16:38 +0200)] 
fix positive NSEC3 wildcards not always being answered

7 years agofix incorrect bitmap usage
Vladimír Čunát [Mon, 7 May 2018 12:45:42 +0000 (14:45 +0200)] 
fix incorrect bitmap usage

7 years agofix "over-optimization", --verbose nitpicks
Vladimír Čunát [Mon, 7 May 2018 12:25:23 +0000 (14:25 +0200)] 
fix "over-optimization", --verbose nitpicks

7 years agolinting nitpicks
Vladimír Čunát [Mon, 7 May 2018 10:17:09 +0000 (12:17 +0200)] 
linting nitpicks

7 years agocomplete proofs if wildcard doesn't exist
Vladimír Čunát [Mon, 7 May 2018 09:46:49 +0000 (11:46 +0200)] 
complete proofs if wildcard doesn't exist

7 years agoWIP: fixes, turned off NSEC3 packet cache, etc.
Vladimír Čunát [Fri, 4 May 2018 17:53:56 +0000 (19:53 +0200)] 
WIP: fixes, turned off NSEC3 packet cache, etc.

It might actually work, except for wildcard checks
(non-existence is assumed without checking/providing a proof record).

7 years agoWIP: nsec3_encloser() finished, maybe?
Vladimír Čunát [Fri, 4 May 2018 14:21:09 +0000 (16:21 +0200)] 
WIP: nsec3_encloser() finished, maybe?

7 years agoWIP checkpoint
Vladimír Čunát [Thu, 3 May 2018 17:06:33 +0000 (19:06 +0200)] 
WIP checkpoint

7 years agowrite NSEC3 key creation
Vladimír Čunát [Mon, 30 Apr 2018 15:05:31 +0000 (17:05 +0200)] 
write NSEC3 key creation

NSEC3 are probably stashed OK now

7 years agoWIP
Vladimír Čunát [Mon, 30 Apr 2018 10:11:50 +0000 (12:11 +0200)] 
WIP

7 years agocache: map_t -> trie_t (easy)
Vladimír Čunát [Sat, 28 Apr 2018 09:20:12 +0000 (11:20 +0200)] 
cache: map_t -> trie_t (easy)

7 years agoutils.h, nsrep.h: drop an unused #include
Vladimír Čunát [Sat, 28 Apr 2018 08:59:32 +0000 (10:59 +0200)] 
utils.h, nsrep.h: drop an unused #include

7 years agodaemon/worker: orphaned tasks prevention
Grigorii Demidov [Tue, 24 Apr 2018 12:22:48 +0000 (14:22 +0200)] 
daemon/worker: orphaned tasks prevention

7 years agonitpicks
Vladimír Čunát [Fri, 27 Apr 2018 09:44:41 +0000 (11:44 +0200)] 
nitpicks

7 years agoMerge branch 'ci-diffrepro' into 'master'
Tomas Krizek [Fri, 27 Apr 2018 08:14:05 +0000 (10:14 +0200)] 
Merge branch 'ci-diffrepro' into 'master'

ci: respdiff - run diffrepro 3 times to reproduce results

See merge request knot/knot-resolver!572

7 years agoci: respdiff - run diffrepro 3 times to reproduce results
Tomas Krizek [Thu, 26 Apr 2018 13:20:53 +0000 (15:20 +0200)] 
ci: respdiff - run diffrepro 3 times to reproduce results

7 years agofixup! post-merge fixups
Vladimír Čunát [Thu, 26 Apr 2018 10:17:41 +0000 (12:17 +0200)] 
fixup! post-merge fixups

7 years agopost-merge fixups
Vladimír Čunát [Wed, 25 Apr 2018 16:14:06 +0000 (18:14 +0200)] 
post-merge fixups

7 years agoMerge branch 'arch-update' into 'master'
Tomas Krizek [Wed, 25 Apr 2018 14:59:21 +0000 (16:59 +0200)] 
Merge branch 'arch-update' into 'master'

distro/arch: generate debug symbols

See merge request knot/knot-resolver!571

7 years agodistro/arch: create debug symbols pkg
Tomas Krizek [Wed, 25 Apr 2018 14:42:06 +0000 (16:42 +0200)] 
distro/arch: create debug symbols pkg

7 years agodistro/arch: don't overwrite kresd.conf by default
Tomas Krizek [Wed, 25 Apr 2018 09:49:50 +0000 (11:49 +0200)] 
distro/arch: don't overwrite kresd.conf by default

7 years agoMerge branch 'master' into cache-NSEC3
Vladimír Čunát [Wed, 25 Apr 2018 12:15:12 +0000 (14:15 +0200)] 
Merge branch 'master' into cache-NSEC3

7 years agoWIP: add forgotten file
Vladimír Čunát [Wed, 25 Apr 2018 09:15:38 +0000 (11:15 +0200)] 
WIP: add forgotten file

7 years agoMerge tag 'v2.3.0' into cache-NSEC3
Vladimír Čunát [Tue, 24 Apr 2018 15:48:15 +0000 (17:48 +0200)] 
Merge tag 'v2.3.0' into cache-NSEC3

TMP

7 years agoMerge !551: misc changes from Marek
Vladimír Čunát [Mon, 23 Apr 2018 16:01:08 +0000 (18:01 +0200)] 
Merge !551: misc changes from Marek

7 years agoiterate: allow lame negative answers in PERMISSIVE mode
Marek Vavruša [Mon, 9 Apr 2018 07:01:53 +0000 (00:01 -0700)] 
iterate: allow lame negative answers in PERMISSIVE mode

Some nameservers are hopelessly broken (ns1-ord.salesforce.com),
and will return lame negative answers which will flag the nameserver
as bad, so it wouldn't be picked for valid queries.

7 years agocopy transitive query flags when CNAME chasing
Marek Vavruša [Fri, 6 Apr 2018 20:25:21 +0000 (13:25 -0700)] 
copy transitive query flags when CNAME chasing

This is an issue for things like disabling minimisation, which only works
for the original query and not for the CNAME target.

7 years agocheck per-query flags instead of global options, getter for NS name
Marek Vavruša [Fri, 6 Apr 2018 05:43:57 +0000 (22:43 -0700)] 
check per-query flags instead of global options, getter for NS name

Checking query flags instead of global context option allows setting
overrides on individual queries. The effect is the same as query flags
start by copying request flags which start by copying context options.

7 years agoadd bindings for the checkout layer
Marek Vavruša [Fri, 6 Apr 2018 05:48:51 +0000 (22:48 -0700)] 
add bindings for the checkout layer

This one was missing from the current bindings. The checkout layer
runs when the worker attempts to send a DNS query to given upstream
when the address is already determined. The layer can add EDNS options
or update outbound query, or block particular addresses / protocol.

7 years agolua: added typecheck for string-to-dname conversion
Marek Vavruša [Tue, 3 Apr 2018 22:51:32 +0000 (15:51 -0700)] 
lua: added typecheck for string-to-dname conversion

7 years agoMerge !519: Restore cache insert RR API
Vladimír Čunát [Mon, 23 Apr 2018 12:44:12 +0000 (14:44 +0200)] 
Merge !519: Restore cache insert RR API

Closes #332.

7 years agocache: restore flagging entries written into cache
Marek Vavruša [Fri, 23 Mar 2018 16:40:36 +0000 (09:40 -0700)] 
cache: restore flagging entries written into cache

This was probably lost during the cache backend rewrite in 2.x

fixes #332

7 years agokres: added missing nil check for dname2str
Marek Vavruša [Thu, 22 Mar 2018 18:06:43 +0000 (11:06 -0700)] 
kres: added missing nil check for dname2str

7 years agokres: added interface for RR set wire size and packet remaining bytes
Marek Vavruša [Thu, 15 Mar 2018 23:13:47 +0000 (16:13 -0700)] 
kres: added interface for RR set wire size and packet remaining bytes

7 years agokres: preserve error code value along with the text explanation
Marek Vavruša [Thu, 15 Mar 2018 22:46:55 +0000 (15:46 -0700)] 
kres: preserve error code value along with the text explanation

Wrapping the error code in a structure preserves both the numeric value
and the ability to convert it into textual format.

7 years agokres: added rr:rdcount() and tests
Marek Vavruša [Thu, 15 Mar 2018 21:38:43 +0000 (14:38 -0700)] 
kres: added rr:rdcount() and tests

7 years agolib/utils: fixed memory corruption in kr_pkt_recycle and kr_pkt_clear_payload
Marek Vavruša [Fri, 16 Mar 2018 02:27:59 +0000 (19:27 -0700)] 
lib/utils: fixed memory corruption in kr_pkt_recycle and kr_pkt_clear_payload

Previous implementation forgot to clear the compression table, which is
an internal structure to packet. So when a recycled packet was reused,
it compared owners of newly inserted records with dangling pointers left
in the compression table.

This is less of a problem in query processing,
as each packet uses a memory pool, so the pointed names were never deallocated,
but it would write out wrong compression pointers because the compression
table kept pointing into packet that was now cleared and reused for something else.

It is more of a problem with packets created without a memory pool,
as the compression table kept references to memory that was already freed.

7 years agokres: cleanup, added typechecks where missing
Marek Vavruša [Thu, 15 Mar 2018 05:54:42 +0000 (22:54 -0700)] 
kres: cleanup, added typechecks where missing

7 years agokres: added rr:merge_data(source) for RR merging
Marek Vavruša [Wed, 14 Mar 2018 21:13:33 +0000 (14:13 -0700)] 
kres: added rr:merge_data(source) for RR merging

This is generally useful for parsing records from packet, as they
are broken into individual RRs that need reassembling.

7 years agokres: add insert and sync interfaces to the cache metatype
Marek Vavruša [Mon, 12 Mar 2018 04:13:05 +0000 (21:13 -0700)] 
kres: add insert and sync interfaces to the cache metatype

This adds metatype wrappers for kr_cache_insert_rr and kr_cache_sync
for the cache metatype, and tests.

7 years agokres: add constructor for rrsets and refactor rr2str function to use it
Marek Vavruša [Mon, 12 Mar 2018 04:12:39 +0000 (21:12 -0700)] 
kres: add constructor for rrsets and refactor rr2str function to use it

This updates the metatype to wrap knot_rrset_add_rdata and knot_rrset_init_empty
in a nicer way, and adds automatic GC destructor and tests.

7 years agocache: changed get_new_ttl private API to allow custom timestamp
Marek Vavruša [Wed, 14 Mar 2018 19:10:46 +0000 (12:10 -0700)] 
cache: changed get_new_ttl private API to allow custom timestamp

Before the API depended on the qry object which only makes sense during
resolution of requests, not when manipulating cache out of it.

7 years agocache: restored kr_cache_insert_rr API
Vladimír Čunát [Mon, 23 Apr 2018 12:26:48 +0000 (14:26 +0200)] 
cache: restored kr_cache_insert_rr API

This commit abstracts out stash_rrset from stash_rrarray_entry,
and fixes incrementing metrics on actual record insertion.
It then resurfaces kr_cache_insert_rr that was deleted in 2.0
using the extracted function.

vcunat separated stash_rrset_precond() later during rebase.

7 years agoMerge !565: changes from security repo v2.3.0
Vladimír Čunát [Mon, 23 Apr 2018 11:08:03 +0000 (13:08 +0200)] 
Merge !565: changes from security repo

Closes #334 and #336

7 years agoNEWS: cleanup
Vladimír Čunát [Mon, 23 Apr 2018 10:43:52 +0000 (12:43 +0200)] 
NEWS: cleanup

- TLS errors were mentioned twice
- the option mode wasn't changed, just a static function name

7 years agorfc7706: fixup links to modules
Vladimír Čunát [Mon, 23 Apr 2018 10:43:07 +0000 (12:43 +0200)] 
rfc7706: fixup links to modules

They didn't work locally for me, at least.

7 years agoMerge branch 'release-2-3-0' into 'master'
Petr Špaček [Mon, 23 Apr 2018 08:40:00 +0000 (10:40 +0200)] 
Merge branch 'release-2-3-0' into 'master'

Release 2.3.0

Closes knot-resolver#334 and knot-resolver#336

See merge request knot/knot-resolver-security!3

7 years agorelease 2.3.0
Tomas Krizek [Fri, 13 Apr 2018 10:57:36 +0000 (12:57 +0200)] 
release 2.3.0

7 years agodocs: document our position on RFC 7706
Petr Špaček [Mon, 23 Apr 2018 08:18:21 +0000 (10:18 +0200)] 
docs: document our position on RFC 7706

7 years agolib/generic/pack: more NULL checks
Vladimír Čunát [Fri, 20 Apr 2018 13:48:07 +0000 (15:48 +0200)] 
lib/generic/pack: more NULL checks

Inspired by Marek's MR.

7 years agodaemon/worker: fix misplaced timer stop
Grigorii Demidov [Thu, 19 Apr 2018 14:02:30 +0000 (16:02 +0200)] 
daemon/worker: fix misplaced timer stop

fixup! 8ea37cc3 daemon/worker: robustness against the slow-lorris attack

7 years agolib/generic/pack: fix a bug/inconsistency
Vladimír Čunát [Thu, 19 Apr 2018 12:28:22 +0000 (14:28 +0200)] 
lib/generic/pack: fix a bug/inconsistency

The NULL is never tested, and it was breaking our usual iteration pattern.

7 years agodaemon/worker: fix missed deinitialization when processing erroneous TCP states
Grigorii Demidov [Thu, 19 Apr 2018 08:55:17 +0000 (10:55 +0200)] 
daemon/worker: fix missed deinitialization when processing erroneous TCP states

7 years agodaemon/worker: adjust tcp timeouts
Grigorii Demidov [Wed, 18 Apr 2018 15:12:36 +0000 (17:12 +0200)] 
daemon/worker: adjust tcp timeouts

This is an attempt to fix two problems:
1. kresd tries to close incoming TCP connection too early. This may lead
to multiple client reconnections. This problem primarily
affects TCP/TLS clients who send several queries over single TCP connection.

2. In certain circumstances outbound TCP connection doesn't timeout
despite that fact that upstream doesn't send back any answers.
This may lead to timeouts on non-problematic queries.

7 years agoMerge branch 'crache' into 'master'
Petr Špaček [Fri, 13 Apr 2018 15:01:33 +0000 (17:01 +0200)] 
Merge branch 'crache' into 'master'

Handle RRs with non-Internet class and meta-types

Closes knot-resolver#334

See merge request knot/knot-resolver-security!2

7 years agocache: catch disallowed RR types at API entry points
Vladimír Čunát [Wed, 4 Apr 2018 17:33:03 +0000 (19:33 +0200)] 
cache: catch disallowed RR types at API entry points

7 years agoMerge branch 'cookie-qcount0' into 'master'
Petr Špaček [Fri, 13 Apr 2018 14:52:39 +0000 (16:52 +0200)] 
Merge branch 'cookie-qcount0' into 'master'

Refuse EDNS cookie requests if cookie module is missing

Closes knot-resolver#336

See merge request knot/knot-resolver-security!4

7 years agoiterate: only pick RRs from the IN class
Vladimír Čunát [Wed, 4 Apr 2018 15:42:35 +0000 (17:42 +0200)] 
iterate: only pick RRs from the IN class

7 years agoMerge branch 'slow-lorris' into 'master'
Petr Špaček [Fri, 13 Apr 2018 14:43:50 +0000 (16:43 +0200)] 
Merge branch 'slow-lorris' into 'master'

Protection against slowlorris attack on autoritative side

See merge request knot/knot-resolver-security!5

7 years agolib/resolve: cleanup
Grigorii Demidov [Thu, 5 Apr 2018 10:28:26 +0000 (12:28 +0200)] 
lib/resolve: cleanup

7 years agolib/resolve: accept incoming requests with QDCOUNT = 0 only if cookie module has...
Grigorii Demidov [Thu, 5 Apr 2018 09:12:31 +0000 (11:12 +0200)] 
lib/resolve: accept incoming requests with QDCOUNT = 0 only if cookie module has loaded.

7 years agodaemon/worker: robustness against the slow-lorris attack
Grigorii Demidov [Fri, 13 Apr 2018 08:19:14 +0000 (10:19 +0200)] 
daemon/worker: robustness against the slow-lorris attack

7 years agoMerge branch 'stale_verbose' into 'master'
Petr Špaček [Fri, 20 Apr 2018 15:26:29 +0000 (17:26 +0200)] 
Merge branch 'stale_verbose' into 'master'

serve_stale: log only in verbose mode

See merge request knot/knot-resolver!564

7 years agoserve_stale: log only in verbose mode
Petr Špaček [Fri, 20 Apr 2018 14:50:24 +0000 (16:50 +0200)] 
serve_stale: log only in verbose mode

7 years agoMerge branch 'packaging-update' into 'master'
Tomas Krizek [Fri, 20 Apr 2018 14:43:27 +0000 (16:43 +0200)] 
Merge branch 'packaging-update' into 'master'

distro/rpm: update dependency declarations to conform with pkg standards

See merge request knot/knot-resolver!563

7 years agodistro/rpm: update dependency declarations to conform with pkg standards
Tomas Krizek [Fri, 20 Apr 2018 14:34:19 +0000 (16:34 +0200)] 
distro/rpm: update dependency declarations to conform with pkg standards

7 years agoMerge branch 'packaging-update' into 'master'
Tomas Krizek [Fri, 20 Apr 2018 14:19:30 +0000 (16:19 +0200)] 
Merge branch 'packaging-update' into 'master'

distro/deb: add prefill module

See merge request knot/knot-resolver!562

7 years agodistro/deb: add prefill module
Tomas Krizek [Fri, 20 Apr 2018 13:57:33 +0000 (15:57 +0200)] 
distro/deb: add prefill module

7 years agoMerge branch 'fromjson' into 'master'
Petr Špaček [Fri, 20 Apr 2018 11:11:26 +0000 (13:11 +0200)] 
Merge branch 'fromjson' into 'master'

export a JSON decode function to lua

See merge request knot/knot-resolver!560

7 years agoexport a JSON decode function to lua
Anbang Wen [Wed, 18 Apr 2018 20:37:42 +0000 (13:37 -0700)] 
export a JSON decode function to lua

Since there is already a bundled JSON library, expose it to lua for
modules to use.

7 years agoMerge branch 'separate-tls-counter' into 'master'
Petr Špaček [Thu, 19 Apr 2018 12:13:10 +0000 (14:13 +0200)] 
Merge branch 'separate-tls-counter' into 'master'

daemon/worker: separate counter for TLS sendings

See merge request knot/knot-resolver!557

7 years agodaemon/worker: separate counter for TLS sendings
Grigorii Demidov [Fri, 13 Apr 2018 15:42:55 +0000 (17:42 +0200)] 
daemon/worker: separate counter for TLS sendings

7 years agoMerge branch 'root-zone-import' into 'master'
Petr Špaček [Wed, 18 Apr 2018 15:18:59 +0000 (17:18 +0200)] 
Merge branch 'root-zone-import' into 'master'

root zone import implementation

See merge request knot/knot-resolver!511

7 years agoprefill: documentation
Petr Špaček [Wed, 18 Apr 2018 12:33:42 +0000 (14:33 +0200)] 
prefill: documentation

7 years agoprefill: replace CA directory path with CA file path
Petr Špaček [Wed, 18 Apr 2018 10:49:50 +0000 (12:49 +0200)] 
prefill: replace CA directory path with CA file path

luasec internally calls SSL_CTX_load_verify_locations() which has
non-intuituve behavior for directories. Given that we already use path
to certificate file for TLS_FORWARD it is better to use consistent and
intuitive interface.

7 years agoprefill: mandate explicit URL configuration
Petr Špaček [Wed, 18 Apr 2018 10:45:16 +0000 (12:45 +0200)] 
prefill: mandate explicit URL configuration

Default values would cause confusion when we introduce support for
non-root zones.

7 years agoprefill: configation syntax for multiple zones
Petr Špaček [Wed, 18 Apr 2018 07:46:28 +0000 (09:46 +0200)] 
prefill: configation syntax for multiple zones

Only root zone can be imported (for now) but we want to
avoid changing syntax when support for other zones is added.

7 years agoprefill: import zone immediately after start
Petr Špaček [Mon, 16 Apr 2018 16:07:04 +0000 (18:07 +0200)] 
prefill: import zone immediately after start

Delaying import would leak bunch of queries from the resolver between
moment of start and import.

7 years agoprefill: split into separate functions, handle daemon restart
Petr Špaček [Mon, 16 Apr 2018 16:03:05 +0000 (18:03 +0200)] 
prefill: split into separate functions, handle daemon restart

The original prefill module did not import zone data after daemon
restart unless the file TTL was expired. The module now reuses data
on disk as long as TTL is not expired, and imports the zone after module
load.

7 years agoprefill: avoid rename syscall
Petr Špaček [Mon, 16 Apr 2018 11:59:56 +0000 (13:59 +0200)] 
prefill: avoid rename syscall

An attempt to rename/move temporary file to its final destination will
fail if /tmp and working directory belong to different filesystems.

It seems that temporary file is not required so it easier to get rid of
it altogether.