]> git.ipfire.org Git - thirdparty/knot-resolver.git/log
thirdparty/knot-resolver.git
6 years agomodule API+ABI: remove one level of indirection
Vladimír Čunát [Thu, 14 Mar 2019 12:09:48 +0000 (13:09 +0100)] 
module API+ABI: remove one level of indirection

... for layers and props.  This breaks C module API+ABI.

It seemed weird to repeatedly call a function that returns a pointer
to a structure in which we find the function we want to actually call.
We've never used changing these functions AFAIK, and the target
functions could easily be written to change their behavior instead
(i.e. move the indirection *inside* the function).

When breaking this, I also removed these two (_layers and _props)
from the dynamic symbols (to be) exported from the C modules.
They always pointed to memory belonging inside the module,
and they seem quite sensible to be set up by the _init symbol instead.

6 years agoMerge branch 'dnstap-turris' into 'master'
Tomas Krizek [Wed, 17 Apr 2019 16:26:25 +0000 (16:26 +0000)] 
Merge branch 'dnstap-turris' into 'master'

dnstap: fix compilation on Turris Omnia

Closes #458

See merge request knot/knot-resolver!805

6 years agodnstap: fix compilation on Turris Omnia
Jan Pavlinec [Tue, 16 Apr 2019 13:35:38 +0000 (15:35 +0200)] 
dnstap: fix compilation on Turris Omnia

Fixes: #458
6 years agoMerge !801: more table print improvements
Vladimír Čunát [Tue, 16 Apr 2019 07:00:47 +0000 (07:00 +0000)] 
Merge !801: more table print improvements

6 years agotable_print: also print function addresses
Petr Špaček [Tue, 16 Apr 2019 06:29:17 +0000 (08:29 +0200)] 
table_print: also print function addresses

It gets handy for debugging, especially when looking at dufferent
callback "instances".

6 years agotable_print: do not run hook for C functions
Petr Špaček [Thu, 11 Apr 2019 15:10:25 +0000 (17:10 +0200)] 
table_print: do not run hook for C functions

It would be pointless anyway as it cannot provide more information.

6 years agotable_print: simplification
Petr Špaček [Thu, 11 Apr 2019 13:57:06 +0000 (15:57 +0200)] 
table_print: simplification

As far as I understand the debug.sethook('call') descrption we are not
going to have any locals except function parameters so we can simplify
the code.

6 years agotable_print: simplify vararg handling
Petr Špaček [Thu, 11 Apr 2019 13:13:21 +0000 (15:13 +0200)] 
table_print: simplify vararg handling

6 years agotable_print: indicate that C functions do not have parameters available
Petr Špaček [Thu, 11 Apr 2019 12:48:04 +0000 (14:48 +0200)] 
table_print: indicate that C functions do not have parameters available

6 years agotable_print: fix indentation
Petr Špaček [Thu, 11 Apr 2019 12:44:06 +0000 (14:44 +0200)] 
table_print: fix indentation

6 years agoMerge branch 'doh_experiment' into 'master'
Petr Špaček [Thu, 11 Apr 2019 07:33:11 +0000 (07:33 +0000)] 
Merge branch 'doh_experiment' into 'master'

DNS-over-HTTP support (server side)

Closes #280

See merge request knot/knot-resolver!799

6 years agodoh: example how to listen on all addresses
Petr Špaček [Wed, 10 Apr 2019 11:41:01 +0000 (13:41 +0200)] 
doh: example how to listen on all addresses

6 years agodoh: fix error handling around empty POST
Petr Špaček [Tue, 9 Apr 2019 11:20:02 +0000 (13:20 +0200)] 
doh: fix error handling around empty POST

6 years agofixup! modules/http DoH: allocate req.qsource on req.pool
Vladimír Čunát [Tue, 9 Apr 2019 11:12:33 +0000 (13:12 +0200)] 
fixup! modules/http DoH: allocate req.qsource on req.pool

Change handling of the inability to get address;
it happens occasionally and the traces were disruptive.

6 years agofixup! modules/http DoH: allocate req.qsource on req.pool
Vladimír Čunát [Mon, 8 Apr 2019 15:55:37 +0000 (17:55 +0200)] 
fixup! modules/http DoH: allocate req.qsource on req.pool

6 years agomodules/http DoH: allocate req.qsource on req.pool
Vladimír Čunát [Mon, 8 Apr 2019 13:54:43 +0000 (15:54 +0200)] 
modules/http DoH: allocate req.qsource on req.pool

The problem is that C structures are not scanned by lua GC,
so we'd have to keep these alive in some other way; therefore
it's simpler to just use the mempool.

6 years agolib/utils kr_straddr_socket(): support mempools
Vladimír Čunát [Mon, 8 Apr 2019 13:52:18 +0000 (15:52 +0200)] 
lib/utils kr_straddr_socket(): support mempools

"Unfortunately", for FFI-bound C functions there it doesn't hold that
missing parameters would be converted to nil/NULL.
Still, this function seems unlikely to have been used outside the repo.

6 years agolua resolve*(): fix a problem with JIT
Vladimír Čunát [Mon, 8 Apr 2019 10:20:20 +0000 (12:20 +0200)] 
lua resolve*(): fix a problem with JIT

It caused crashes somewhere inside LuaJIT or the JIT-ed code.

6 years agodoh: add docs
Petr Špaček [Thu, 4 Apr 2019 16:25:09 +0000 (18:25 +0200)] 
doh: add docs

6 years agohttp: print nice error if cert exists but key does not
Petr Špaček [Thu, 4 Apr 2019 16:21:37 +0000 (18:21 +0200)] 
http: print nice error if cert exists but key does not

6 years agodoh: cleanup, removing unused Lua variables
Petr Špaček [Thu, 4 Apr 2019 11:33:04 +0000 (13:33 +0200)] 
doh: cleanup, removing unused Lua variables

6 years agodoh: limit max query size to 1024 B
Petr Špaček [Thu, 4 Apr 2019 11:19:45 +0000 (13:19 +0200)] 
doh: limit max query size to 1024 B

The value is kind of arbitrary, as precaution. 64k value was causing
cqueues to close connections with GET requests with "Broken pipe"
and it seems to work with 1024 B.

6 years agodoh: code cleanup, merging resolve_pkt and resolve
Petr Špaček [Thu, 4 Apr 2019 10:38:53 +0000 (12:38 +0200)] 
doh: code cleanup, merging resolve_pkt and resolve

6 years agodoh: polish timeouts
Petr Špaček [Wed, 3 Apr 2019 14:33:13 +0000 (16:33 +0200)] 
doh: polish timeouts

6 years agodoh: remove devel output
Petr Špaček [Wed, 3 Apr 2019 14:29:17 +0000 (16:29 +0200)] 
doh: remove devel output

6 years agostats: collect stats on inbound transport protocol
Petr Špaček [Wed, 3 Apr 2019 14:27:07 +0000 (16:27 +0200)] 
stats: collect stats on inbound transport protocol

6 years agodoh: remember source transport
Petr Špaček [Wed, 3 Apr 2019 13:12:38 +0000 (15:12 +0200)] 
doh: remember source transport

6 years agodoh: test RFC 8484 section 6 - huge answers
Petr Špaček [Wed, 3 Apr 2019 12:08:05 +0000 (14:08 +0200)] 
doh: test RFC 8484 section 6 - huge answers

6 years agodoh: make client and server address available to modules
Petr Špaček [Tue, 2 Apr 2019 17:12:46 +0000 (19:12 +0200)] 
doh: make client and server address available to modules

This will allow modules like view etc. work in the same way with packets
received over HTTP.

6 years agodoh: fix memory leaks
Petr Špaček [Tue, 2 Apr 2019 16:18:34 +0000 (18:18 +0200)] 
doh: fix memory leaks

6 years agodoh: send out HTTP TTL
Petr Špaček [Tue, 2 Apr 2019 13:49:17 +0000 (15:49 +0200)] 
doh: send out HTTP TTL

We intentionally compute max-age header as minimum over all RRs, doing
so only over ANSWER section does not make sense (and RFC 8484 allows us
to do so).

6 years agodoh: GET support, breaks on large payloads
Petr Špaček [Mon, 1 Apr 2019 17:05:57 +0000 (19:05 +0200)] 
doh: GET support, breaks on large payloads

This seems to be a limitation in cqueues but we have to confirm this.

6 years agodoh: checks around POST HTTP method
Petr Špaček [Mon, 1 Apr 2019 16:01:08 +0000 (18:01 +0200)] 
doh: checks around POST HTTP method

6 years agofixup! WIP: DoH experiment
Vladimír Čunát [Fri, 29 Mar 2019 19:46:36 +0000 (20:46 +0100)] 
fixup! WIP: DoH experiment

6 years agocache: fix incorrect TTL of positive packets in cache
Vladimír Čunát [Fri, 29 Mar 2019 19:16:31 +0000 (20:16 +0100)] 
cache: fix incorrect TTL of positive packets in cache

It's a regression of b00ee5fa8 (v3.0.0).  Fortunately, since that
version we use cache for positive packets only when they are BOGUS
(see `bool want_pkt =`) so that they're available for +cd queries.
Therefore the impact was really negligible, until the DoT module.

6 years agoDoH experiment
Petr Špaček [Fri, 29 Mar 2019 15:35:31 +0000 (16:35 +0100)] 
DoH experiment

First version which actually works with Firefox DoH in default
configuration.

Limitations:
- does not support HTTP GET method
- headers for HTTP cache are not generated
- error handling is largely missing
- no tests
- ACLs will not work, modules do not see source IP address of the HTTP
endpoint

6 years agoMerge branch 'table_print' into 'master'
Petr Špaček [Wed, 10 Apr 2019 12:24:29 +0000 (12:24 +0000)] 
Merge branch 'table_print' into 'master'

Usability improvements for table_print

See merge request knot/knot-resolver!790

6 years agofixup! sandbox: table_print prints function signatures instead of pointers
Vladimír Čunát [Wed, 10 Apr 2019 11:59:14 +0000 (13:59 +0200)] 
fixup! sandbox: table_print prints function signatures instead of pointers

6 years agofixup! sandbox: table_print sorts table keys
Vladimír Čunát [Wed, 10 Apr 2019 11:44:59 +0000 (13:44 +0200)] 
fixup! sandbox: table_print sorts table keys

6 years agosandbox: table_print prints function signatures instead of pointers
Petr Špaček [Sat, 16 Mar 2019 11:26:19 +0000 (12:26 +0100)] 
sandbox: table_print prints function signatures instead of pointers

This does not work with C functions etc. but it seems that we do not
expose them directly in Lua interface for users.

6 years agosandbox: table_print sorts table keys
Petr Špaček [Sat, 16 Mar 2019 10:06:21 +0000 (11:06 +0100)] 
sandbox: table_print sorts table keys

This makes it much easier to navigate in complex data structures.
AFAIK table_print is not used for anything except user interface so it
is not performance critical and we can re-sort table every time.

6 years agoMerge branch 'deb-pkging-cleanup' into 'master'
Tomas Krizek [Wed, 10 Apr 2019 11:06:42 +0000 (11:06 +0000)] 
Merge branch 'deb-pkging-cleanup' into 'master'

drop libkres9 and libkres-dev packages

See merge request knot/knot-resolver!795

6 years agodrop libkres9 and libkres-dev packages
Daniel Kahn Gillmor [Sun, 24 Mar 2019 18:03:45 +0000 (19:03 +0100)] 
drop libkres9 and libkres-dev packages

Debian packaging as of 3.2.1-3 is no longer shipping libkres9 or
libkres-dev (see https://bugs.debian.org/923970).  This brings the
upstream debian-style packaging in line with the Debian packaging on
that front.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
6 years agoMerge branch 'ds-algo-nodata' into 'master'
Petr Špaček [Mon, 8 Apr 2019 12:44:49 +0000 (12:44 +0000)] 
Merge branch 'ds-algo-nodata' into 'master'

validate nitpick fix: unsupported algo edge case

See merge request knot/knot-resolver!798

6 years agovalidate nitpick fix: unsupported algo edge case
Vladimír Čunát [Thu, 28 Mar 2019 07:34:26 +0000 (08:34 +0100)] 
validate nitpick fix: unsupported algo edge case

kr_dnskeys_trusted() semantics is changed, but I do NOT consider that
a part of public API.

Go insecure due to algorithm support even if DNSKEY is NODATA.
I can't see how that's relevant to practical usage, but I think this new
behavior makes more sense.  We still do try to fetch the DNSKEY even
though we have information about its un-usability beforehand.
I'd consider fixing that a premature optimization.
We'll still be affected if the DNSKEY query SERVFAILs or something.

Thanks to PowerDNS people for catching this!

6 years agoMerge branch 'pytests-check-gnutls' into 'master'
Petr Špaček [Fri, 5 Apr 2019 16:45:03 +0000 (16:45 +0000)] 
Merge branch 'pytests-check-gnutls' into 'master'

pytests: check minimum required gnutls version

Closes #457

See merge request knot/knot-resolver!796

6 years agopytests: check minimum required gnutls version
Tomas Krizek [Mon, 25 Mar 2019 08:46:57 +0000 (09:46 +0100)] 
pytests: check minimum required gnutls version

Add a message to make extra requirements clear instead of throwing
a compilation error.

Closes #457

6 years agoMerge branch 'key-rollover' into 'master'
Tomas Krizek [Thu, 4 Apr 2019 13:03:10 +0000 (13:03 +0000)] 
Merge branch 'key-rollover' into 'master'

daemon/lua/trust_anchors: don't crash when dealing with unknown algorhitm

Closes #449

See merge request knot/knot-resolver!788

6 years agotrust_anchors: update Deckard to take ta_update module into account
Petr Špaček [Thu, 4 Apr 2019 11:46:51 +0000 (13:46 +0200)] 
trust_anchors: update Deckard to take ta_update module into account

6 years agotrust_anchors: improve error messages
Tomas Krizek [Thu, 28 Mar 2019 11:41:32 +0000 (12:41 +0100)] 
trust_anchors: improve error messages

6 years agotrust_anchors: add explanatory error messages for removed functions
Petr Špaček [Fri, 22 Mar 2019 15:32:12 +0000 (16:32 +0100)] 
trust_anchors: add explanatory error messages for removed functions

6 years agounify error message format between between C and Lua
Petr Špaček [Fri, 22 Mar 2019 15:30:17 +0000 (16:30 +0100)] 
unify error message format between between C and Lua

User-friendly error message is intentionally at the end so users,
typically looking at the last line in logs, can see immediatelly what
happened.

6 years agotrust_anchors: do not accept add_file() for managed TA without ta_update module
Petr Špaček [Fri, 22 Mar 2019 13:45:56 +0000 (14:45 +0100)] 
trust_anchors: do not accept add_file() for managed TA without ta_update module

Previous version would add the TA and then print error message, which is
not expected.

6 years agomeson: config_tests - remove obsolete args, retuncode checks
Tomas Krizek [Wed, 20 Mar 2019 12:32:55 +0000 (13:32 +0100)] 
meson: config_tests - remove obsolete args, retuncode checks

6 years agotrust_anchrors/bootstrap.test: fix test
Tomas Krizek [Mon, 18 Mar 2019 13:05:30 +0000 (14:05 +0100)] 
trust_anchrors/bootstrap.test: fix test

6 years agoWIP: test/integration: update deckard
Tomas Krizek [Wed, 13 Mar 2019 11:51:39 +0000 (12:51 +0100)] 
WIP: test/integration: update deckard

6 years agoci: fix luacheck
Tomas Krizek [Tue, 19 Mar 2019 16:16:03 +0000 (17:16 +0100)] 
ci: fix luacheck

6 years agota_update.test: increase time for testing in CI
Tomas Krizek [Tue, 19 Mar 2019 15:45:50 +0000 (16:45 +0100)] 
ta_update.test: increase time for testing in CI

6 years agota_update: abort update if keyset is no longer managed
Tomas Krizek [Tue, 19 Mar 2019 15:20:11 +0000 (16:20 +0100)] 
ta_update: abort update if keyset is no longer managed

6 years agota_update: remove useless initialization
Tomas Krizek [Tue, 19 Mar 2019 14:33:57 +0000 (15:33 +0100)] 
ta_update: remove useless initialization

It's impossible to add managed keysets unless ta_update is loaded,
in which case ta_update.start() is called by trust_anchors.add_file().

On ta_update unload, previously managed keys are flagged as unmanaged.

6 years agodoc/upgrading: document removal of -k and -K
Tomas Krizek [Tue, 19 Mar 2019 13:27:05 +0000 (14:27 +0100)] 
doc/upgrading: document removal of -k and -K

6 years agotrust_anchors: remove syntactic sugar and duplicity
Tomas Krizek [Tue, 19 Mar 2019 12:01:35 +0000 (13:01 +0100)] 
trust_anchors: remove syntactic sugar and duplicity

6 years agotrust_anchors: always load keyfile_default
Tomas Krizek [Tue, 19 Mar 2019 11:20:55 +0000 (12:20 +0100)] 
trust_anchors: always load keyfile_default

6 years agotrust_anchors: make sure to stop tracking managed key when overriding it
Tomas Krizek [Mon, 18 Mar 2019 17:31:12 +0000 (18:31 +0100)] 
trust_anchors: make sure to stop tracking managed key when overriding it

6 years agodaemon: remove -k/-K options
Tomas Krizek [Mon, 18 Mar 2019 17:24:11 +0000 (18:24 +0100)] 
daemon: remove -k/-K options

Since DNSSEC is now enabled by default and always loads the
keyfile_default specified during compilation, these options are
obsolete.

Use trust_anchors.add_file() in config file if you require this
functionality.

6 years agoscripts/launch-test-instance: remove obsolete script
Tomas Krizek [Mon, 18 Mar 2019 16:25:18 +0000 (17:25 +0100)] 
scripts/launch-test-instance: remove obsolete script

6 years agota_update: polish test
Tomas Krizek [Mon, 18 Mar 2019 12:17:13 +0000 (13:17 +0100)] 
ta_update: polish test

6 years agotrust_anchors: rename distrust to remove
Tomas Krizek [Mon, 18 Mar 2019 11:57:49 +0000 (12:57 +0100)] 
trust_anchors: rename distrust to remove

6 years agotrust_anchors: document distrust and polish related docs
Petr Špaček [Fri, 15 Mar 2019 16:23:57 +0000 (17:23 +0100)] 
trust_anchors: document distrust and polish related docs

6 years agota_update: remove parameter refresh_plan(is_initial)
Petr Špaček [Fri, 15 Mar 2019 15:58:06 +0000 (16:58 +0100)] 
ta_update: remove parameter refresh_plan(is_initial)

It was unused since cleanup in trust_anchors and just cluttering the code.

6 years agotrust_anchors: use cleaner interface between ta_update and trust_anchors module
Tomas Krizek [Tue, 19 Mar 2019 13:10:27 +0000 (14:10 +0100)] 
trust_anchors: use cleaner interface between ta_update and trust_anchors module

+ tests

Exracting RFC 5011 to separate module was a good opportunity for
cleanup.

6 years agotrust_anchors: add distrust function to remove TA
Petr Špaček [Fri, 15 Mar 2019 15:32:29 +0000 (16:32 +0100)] 
trust_anchors: add distrust function to remove TA

6 years agotrust_anchors: do not bootstrap if root TA exists
Petr Špaček [Thu, 14 Mar 2019 16:57:49 +0000 (17:57 +0100)] 
trust_anchors: do not bootstrap if root TA exists

Previously a typo in keyfile path triggered re-bootstrap even if root TA
was already installed.

6 years agotrust_anchors: get rid of double negation in add_file()
Petr Špaček [Thu, 14 Mar 2019 16:54:33 +0000 (17:54 +0100)] 
trust_anchors: get rid of double negation in add_file()

This simple change makes it easier to follow what the code does.

6 years agoci: luacheckrc - organize, add ta_update
Tomas Krizek [Wed, 13 Mar 2019 13:31:31 +0000 (14:31 +0100)] 
ci: luacheckrc - organize, add ta_update

6 years agonitpick: modules/ta_update - unify log message format
Tomas Krizek [Wed, 13 Mar 2019 12:41:45 +0000 (13:41 +0100)] 
nitpick: modules/ta_update - unify log message format

6 years agomodules/ta_update: remove all asserts
Tomas Krizek [Wed, 13 Mar 2019 12:40:25 +0000 (13:40 +0100)] 
modules/ta_update: remove all asserts

6 years agotests/integration: update kresd config for deckard
Tomas Krizek [Wed, 13 Mar 2019 11:51:14 +0000 (12:51 +0100)] 
tests/integration: update kresd config for deckard

6 years agolua/trust_anchors: use tabs everywhere
Tomas Krizek [Wed, 13 Mar 2019 11:23:22 +0000 (12:23 +0100)] 
lua/trust_anchors: use tabs everywhere

6 years agodaemon/lua/trust_anchors: write keyset after bootstrap
Tomas Krizek [Wed, 13 Mar 2019 11:22:28 +0000 (12:22 +0100)] 
daemon/lua/trust_anchors: write keyset after bootstrap

6 years agomodules/ta_update: move RFC5011 to a separate module
Tomas Krizek [Tue, 12 Mar 2019 17:47:35 +0000 (18:47 +0100)] 
modules/ta_update: move RFC5011 to a separate module

6 years agodaemon/lua/trust_anchors: bootstrap TA immediately after startup
Tomas Krizek [Tue, 12 Mar 2019 14:47:46 +0000 (15:47 +0100)] 
daemon/lua/trust_anchors: bootstrap TA immediately after startup

6 years agodaemon/lua/trust_anchors: don't crash when dealing with unknown algorhitm
Tomas Krizek [Tue, 12 Mar 2019 14:31:42 +0000 (15:31 +0100)] 
daemon/lua/trust_anchors: don't crash when dealing with unknown algorhitm

6 years agodaemon/lua/trust_anchors.test.integr: test key rollover to unsupported algorhitm
Tomas Krizek [Mon, 11 Mar 2019 16:20:31 +0000 (17:20 +0100)] 
daemon/lua/trust_anchors.test.integr: test key rollover to unsupported algorhitm

6 years agoMerge branch 'pytests-silent' into 'master'
Petr Špaček [Fri, 22 Mar 2019 08:34:47 +0000 (08:34 +0000)] 
Merge branch 'pytests-silent' into 'master'

pytests: omit verbose log for query flood test

See merge request knot/knot-resolver!793

6 years agopytests: omit verbose log for query flood test
Tomas Krizek [Thu, 21 Mar 2019 14:57:25 +0000 (15:57 +0100)] 
pytests: omit verbose log for query flood test

6 years agoMerge branch 'listen-on-tls' into 'master'
Tomas Krizek [Wed, 20 Mar 2019 12:47:33 +0000 (12:47 +0000)] 
Merge branch 'listen-on-tls' into 'master'

daemon: listen on TLS port 853 by default

See merge request knot/knot-resolver!792

6 years agodaemon: listen on TLS port 853 by default
Tomas Krizek [Wed, 20 Mar 2019 11:57:16 +0000 (12:57 +0100)] 
daemon: listen on TLS port 853 by default

6 years agoMerge branch 'ci-updates' into 'master'
Tomas Krizek [Wed, 20 Mar 2019 09:41:27 +0000 (09:41 +0000)] 
Merge branch 'ci-updates' into 'master'

ci: minor updates

See merge request knot/knot-resolver!791

6 years agoci: archive logs properly testlogs
Tomas Krizek [Tue, 19 Mar 2019 16:20:23 +0000 (17:20 +0100)] 
ci: archive logs properly testlogs

6 years agoci: fix obs-devel nightly build
Tomas Krizek [Wed, 20 Mar 2019 09:14:34 +0000 (10:14 +0100)] 
ci: fix obs-devel nightly build

6 years agoMerge branch 'meson-fix-includes' into 'master'
Tomas Krizek [Tue, 19 Mar 2019 16:21:22 +0000 (16:21 +0000)] 
Merge branch 'meson-fix-includes' into 'master'

meson: use correct luajit includes from pkgconfig

See merge request knot/knot-resolver!789

6 years agoci/travis: update script to reflect API changes
Tomas Krizek [Wed, 13 Mar 2019 17:00:37 +0000 (18:00 +0100)] 
ci/travis: update script to reflect API changes

6 years agomeson: use correct luajit includes from pkgconfig
Tomas Krizek [Wed, 13 Mar 2019 16:47:07 +0000 (17:47 +0100)] 
meson: use correct luajit includes from pkgconfig

6 years agoMerge branch 'nsrep-bugfix' into 'master'
Petr Špaček [Tue, 12 Mar 2019 13:04:42 +0000 (13:04 +0000)] 
Merge branch 'nsrep-bugfix' into 'master'

nsrep: allow inclusion of good nameservers if there's space in selection

See merge request knot/knot-resolver!787

6 years agonsrep: allow inclusion of good nameservers if there's space in selection
Marek Vavruša [Tue, 5 Mar 2019 18:35:21 +0000 (10:35 -0800)] 
nsrep: allow inclusion of good nameservers if there's space in selection

The current algorithm doesn't work if there's 3 unknown nameservers in the
address selection set, and the 4th is known working with higher score
than unknown.

6 years agoMerge branch 'netlist' into 'master'
Petr Špaček [Tue, 12 Mar 2019 13:03:36 +0000 (13:03 +0000)] 
Merge branch 'netlist' into 'master'

change net.list() output format

Closes #448

See merge request knot/knot-resolver!786

6 years agodaemon/network endpoint_array_t: decrease indirection
Vladimír Čunát [Tue, 12 Mar 2019 10:17:27 +0000 (11:17 +0100)] 
daemon/network endpoint_array_t: decrease indirection

The extra pointer layer was useless.  Note: we couldn't put an UV handle
directly inside an array because their addresses can't be moved IIRC,
but we had it behind a pointer already.

6 years agodaemon/network: enum endpoint_flag -> endpoint_flags_t
Vladimír Čunát [Tue, 12 Mar 2019 09:28:53 +0000 (10:28 +0100)] 
daemon/network: enum endpoint_flag -> endpoint_flags_t

The dual UDP+TCP is completely eliminated except for the externally
exposed "APIs" - lua net.listen() and command-line parameters.

6 years agodaemon/network: adapt _listen and _close to repeats
Vladimír Čunát [Mon, 11 Mar 2019 17:33:19 +0000 (18:33 +0100)] 
daemon/network: adapt _listen and _close to repeats

We could get multiple addr#port tuples even before the UDP+TCP split,
but now it would becom quite common, so the API needs to count on that.