]>
git.ipfire.org Git - thirdparty/knot-resolver.git/log
Vladimír Čunát [Wed, 2 Nov 2016 10:16:01 +0000 (11:16 +0100)]
daemon: avoid a tiny memory leak
Vladimír Čunát [Wed, 31 Aug 2016 14:35:54 +0000 (16:35 +0200)]
lru_get_new *can* return NULL
... and that doesn't necessarily mean that malloc() failed.
We do *not* want to evict a heavy-hitter by an unfrequent element.
Note: even the implementation currently in master *did* return NULL,
so some parts of the code were just wrongly returning ENOMEM.
Vladimír Čunát [Wed, 31 Aug 2016 15:21:47 +0000 (17:21 +0200)]
lru: new implementation and also interface
The implementation is now similar to set-associative caches
that x86 CPU use. Also the API is changed a bit, leading to
slight simplification of our use patterns.
Marek Vavrusa [Mon, 5 Sep 2016 00:11:18 +0000 (17:11 -0700)]
bench: make bench, dataset for lru, cleanup
`make bench` now runs a predefined set of
microbenchmarks (right now LRU), it's a start
for comparative microbench of internal structures
Vladimír Čunát [Wed, 31 Aug 2016 15:18:45 +0000 (17:18 +0200)]
add simple LRU benchmarks
The Makefile isn't perfect. I noted it doesn't clean the bench,
but we have the same problem for some other parts, e.g. in deckard.
Vladimír Čunát [Mon, 31 Oct 2016 15:35:12 +0000 (16:35 +0100)]
Merge branch 'p/reorder' into 'master'
add option to reorder cached RRs in answers
Fixes https://gitlab.labs.nic.cz/knot/resolver/issues/93.
API of a KR_EXPORT function is changed, so ABIVER is bumped.
See merge request !47
Ondřej Surý [Wed, 26 Oct 2016 10:05:55 +0000 (12:05 +0200)]
Merge branch 'improve-version.mk' into 'master'
Improve version.mk
See merge request !61
Ondřej Surý [Wed, 26 Oct 2016 10:05:21 +0000 (12:05 +0200)]
Improve version.mk a bit to use $(call quiet,,)
Vladimír Čunát [Wed, 14 Sep 2016 10:53:01 +0000 (12:53 +0200)]
add option to reorder cached RRs in answers
Fixes https://gitlab.labs.nic.cz/knot/resolver/issues/93.
API of a KR_EXPORT function is changed, so ABIVER is bumped.
Ondřej Surý [Sun, 23 Oct 2016 10:50:31 +0000 (12:50 +0200)]
Print system/embedded for lmdb instead of yes/no as it is always present
Vladimír Čunát [Fri, 21 Oct 2016 14:40:08 +0000 (16:40 +0200)]
Merge branch 'coverity-fix' into 'master'
daemon: another UINT_MAX -> UINT32_MAX
See merge request !58
Grigorii Demidov [Fri, 21 Oct 2016 14:36:18 +0000 (16:36 +0200)]
daemon: another UINT_MAX -> UINT32_MAX
Vladimír Čunát [Fri, 21 Oct 2016 13:39:47 +0000 (15:39 +0200)]
Merge branch 'coverity-fix' into 'master'
daemon: some minor coverity scan issues were fixed
See merge request !49
Vladimír Čunát [Fri, 21 Oct 2016 13:38:02 +0000 (15:38 +0200)]
daemon: nitpicks about the parent commit
Ondřej Surý [Fri, 21 Oct 2016 11:16:28 +0000 (13:16 +0200)]
Merge branch 'gitignore-fix' into 'master'
Remove sandbox.lua from .gitignore
See merge request !56
Ondřej Surý [Fri, 21 Oct 2016 11:15:56 +0000 (13:15 +0200)]
Remove sandbox.lua from .gitignore
Ondřej Surý [Fri, 21 Oct 2016 09:04:24 +0000 (11:04 +0200)]
Merge branch 'dynamic-soversion' into 'master'
Resolve libknot and libzscanner SONAME at the build time and fixes to bootstrap-depends.sh script
The OS X build is still failing, but it's unrelated to these changes.
See merge request !55
Ondřej Surý [Thu, 20 Oct 2016 12:20:39 +0000 (14:20 +0200)]
Disable GnuTLS tools and CXX library
Ondřej Surý [Tue, 18 Oct 2016 07:39:10 +0000 (09:39 +0200)]
Dynamically resolve SONAME for libknot and libzscanner from Makefile
and set libknot_SONAME and libzscanner_SONAME as lua literals.
Remove now obsolete libpath lua function - use find_soname from
platform.mk to define <arg>_SONAME, add lua_pushliteral to
daemon/engine.c and add -D to daemon/daemon.mk for any new library
loaded from Lua.
Ondřej Surý [Wed, 19 Oct 2016 14:31:26 +0000 (16:31 +0200)]
Build GnuTLS with --without-p11-kit
Ondřej Surý [Wed, 19 Oct 2016 09:38:53 +0000 (11:38 +0200)]
Update bootstrap-depends.sh to latest upstream versions
Ondřej Surý [Wed, 19 Oct 2016 10:30:09 +0000 (12:30 +0200)]
bootstrap-depends.sh will cleanup local directory when changed and BOOTSTRAP_CLEANUP is set
Ondřej Surý [Wed, 19 Oct 2016 10:41:06 +0000 (12:41 +0200)]
Upgrade pip before using it
Ondřej Surý [Wed, 19 Oct 2016 10:37:24 +0000 (12:37 +0200)]
Bump libknot to 2.3.1
Vladimír Čunát [Thu, 20 Oct 2016 16:49:43 +0000 (18:49 +0200)]
Merge branch 'early_awareness_notification' into 'master'
Early awareness notification: a new lua module `version`
to periodically check for newer version on server and for CVE.
See merge request !52
Vladimír Čunát [Thu, 20 Oct 2016 16:39:07 +0000 (18:39 +0200)]
modules/version: only report CVE if versions differ
Also avoid that extremely long line.
Vladimír Čunát [Wed, 19 Oct 2016 13:42:09 +0000 (15:42 +0200)]
modules/version: doc details
Vladimír Čunát [Wed, 19 Oct 2016 10:54:52 +0000 (12:54 +0200)]
modules/version: better way of finding own version
Vladimír Čunát [Wed, 19 Oct 2016 10:45:22 +0000 (12:45 +0200)]
build: introduce $(VERSION) to reduce repeating
Štěpán Balážik [Wed, 19 Oct 2016 11:10:13 +0000 (13:10 +0200)]
Added periodicity and fixed status messages.
Štěpán Balážik [Wed, 19 Oct 2016 07:08:27 +0000 (09:08 +0200)]
Fixed typos.
Vladimír Čunát [Wed, 19 Oct 2016 16:17:54 +0000 (18:17 +0200)]
Merge branch 'worker-uninit' into 'master'
worker: avoid uninitialized pointers
The cookie module could segfault due to the `opt` pointer not being initialized when no EDNS was sent in the incoming request.
See merge request !53
Vladimír Čunát [Wed, 19 Oct 2016 15:59:56 +0000 (17:59 +0200)]
worker: avoid uninitialized pointers
The cookie module could segfault due to the `opt` pointer not being
initialized when no EDNS was sent in the incoming request.
Štěpán Balážik [Wed, 19 Oct 2016 07:02:42 +0000 (09:02 +0200)]
Added Lua module version for checking version and CVE.
Vladimír Čunát [Tue, 18 Oct 2016 20:03:08 +0000 (22:03 +0200)]
Merge branch 'resolve_example_in_documentation' into 'master'
Fix documentation example for using resolve() function.
See merge request !51
Stepan Balazik [Tue, 18 Oct 2016 17:29:21 +0000 (19:29 +0200)]
Fixed example for using resolve() function.
Grigorii Demidov [Tue, 11 Oct 2016 11:12:00 +0000 (13:12 +0200)]
daemon: some minor coverity scan issues were fixed
Michal Karm Babacek [Thu, 6 Oct 2016 20:20:00 +0000 (22:20 +0200)]
Tip for running kresd in containers.
Based on [issue 28](https://github.com/CZ-NIC/knot-resolver/issues/28), we were able to boost kresd performance running in a Docker container on DockerCloud by nearly 100% by binding to a single interface:ipaddress. It might be handy for other users to know.
Ondřej Surý [Mon, 3 Oct 2016 11:15:52 +0000 (13:15 +0200)]
Merge branch 'p/net.listen' into 'master'
net.listen: make it more flexible
As noted in #94, it feels natural to call it like:
``net.listen({net.lo, '192.168.1.1'})``
Also minor fixes were done in that function and corresponding docs.
See merge request !46
Vladimír Čunát [Fri, 30 Sep 2016 13:10:55 +0000 (15:10 +0200)]
doc: fix a typo
Marek Vavrusa [Tue, 27 Sep 2016 20:14:36 +0000 (20:14 +0000)]
daemon/worker: set query source addr for tcp
Ondřej Surý [Thu, 8 Sep 2016 14:48:43 +0000 (16:48 +0200)]
Various little quirks required to build on FreeBSD
Vladimír Čunát [Wed, 7 Sep 2016 13:07:34 +0000 (15:07 +0200)]
Merge !45: various nitpicks
Assortment of unimportant changes that I created during trying to understand how the whole resolution process works. Best read each commit separately.
Vladimír Čunát [Wed, 7 Sep 2016 12:46:16 +0000 (14:46 +0200)]
net.listen: make it more flexible
As noted in #94, it feels natural to call it like:
``net.listen({net.lo, '192.168.1.1'})``
Also, minor fixes were done in that function and corresponding docs.
Marek Vavrusa [Mon, 5 Sep 2016 00:42:03 +0000 (17:42 -0700)]
daemon/worker: retransmit based on current score
if the score is known (and not glued), the retry
rate is <avg(rtt), 250ms>
if the NS score is unknown or worse than 250ms,
it is always retried at this rate
all other servers in the list use default rate
Marek Vavrusa [Mon, 5 Sep 2016 00:40:22 +0000 (17:40 -0700)]
lib/nsrep: respect -DFAVOUR_IPV6=X
maintainer may wish to choose neutral or even
more favoured server selection of IPv6 servers.
-DFAVOUR_IPV6=0 makes neutral server selection
-DFAVOUR_IPV6=40 gives IPv6 40ms better chance
Marek Vavrusa [Sun, 4 Sep 2016 23:11:08 +0000 (16:11 -0700)]
modules/http: changed wording
Marek Vavrusa [Thu, 25 Aug 2016 17:45:01 +0000 (10:45 -0700)]
build: bumped version requirement to libknot 2.2.0
Marek Vavrusa [Thu, 25 Aug 2016 17:41:29 +0000 (10:41 -0700)]
modules/http: cleanup
Marek Vavrusa [Thu, 25 Aug 2016 17:40:00 +0000 (10:40 -0700)]
build: cleanup, fixes for FreeBSD
Marek Vavrusa [Thu, 25 Aug 2016 17:39:40 +0000 (10:39 -0700)]
modules/daf: support multiple targets in forward
RTT tracking for all targets is also supported,
but no loadbalancing is done based on that yet
Vladimír Čunát [Thu, 25 Aug 2016 16:11:12 +0000 (18:11 +0200)]
daemon/worker.h: drop unused typedef qr_task_send_cb
Vladimír Čunát [Thu, 25 Aug 2016 14:42:57 +0000 (16:42 +0200)]
move worker initialization to daemon/worker.c
Consequently, there's no use for worker_reserve in the header.
Vladimír Čunát [Thu, 25 Aug 2016 14:27:08 +0000 (16:27 +0200)]
daemon/worker.h: move internal stuff to the end
Also break overlong lines.
Vladimír Čunát [Thu, 25 Aug 2016 10:57:52 +0000 (12:57 +0200)]
daemon/main: error handling nitpicks
The last hunk: we'd report worker failure even if we didn't
attempt to start it due to previous failures.
Vladimír Čunát [Thu, 25 Aug 2016 11:38:00 +0000 (13:38 +0200)]
docs nitpicks
Vladimír Čunát [Wed, 24 Aug 2016 15:08:53 +0000 (17:08 +0200)]
don't use kr_crypto_reinit()
We called kr_crypto_init() just before forking and then _reinit() in
all children, but we never did any cryptography in-between - better
initialize after forking.
Note: the function is KR_EXPORT. It might not be useful anymore, but
its removal would require bumping libkres soname.
Vladimír Čunát [Thu, 25 Aug 2016 12:35:09 +0000 (14:35 +0200)]
fix version number to 1.1.1
Reported: https://gitlab.labs.nic.cz/knot/resolver/issues/92
Ondřej Surý [Wed, 24 Aug 2016 12:05:47 +0000 (14:05 +0200)]
Update NEWS
Ondřej Surý [Wed, 24 Aug 2016 12:03:29 +0000 (14:03 +0200)]
Reuse packet_source address when retrying over TCP. This prevents
timeouts over TCP when <n> first nameservers timeout over UDP as
previously the TCP would connect again to the first and only the
first nameserver in task->addrlist.
This would need to be ultimately fixed in TCP Fast Retransmit.
Ondřej Surý [Wed, 24 Aug 2016 11:59:22 +0000 (13:59 +0200)]
Add missing curly braces
Ondřej Surý [Wed, 24 Aug 2016 09:22:33 +0000 (11:22 +0200)]
Add missing %s
Ondřej Surý [Wed, 24 Aug 2016 08:33:44 +0000 (10:33 +0200)]
Fix querying/optional listing when retrying with different destination
Ondřej Surý [Wed, 24 Aug 2016 06:40:35 +0000 (08:40 +0200)]
Update NEWS file for 1.1.1 release
Marek Vavrusa [Wed, 24 Aug 2016 00:28:47 +0000 (17:28 -0700)]
lib/resolve: track rtt of all tried servers
when doing fast retransmit, each address may be
contacted 1-N times, but previously only cumulative
RTT was tracked for the NS that sent the answer.
now the approximate query start time is subtracted
from cumulative RTT to give an idea how long it
took since the query was actually sent, and all
the NSs that didn't respond within their retransmit
windows are penalised too
Marek Vavrusa [Tue, 23 Aug 2016 21:17:40 +0000 (14:17 -0700)]
lib/resolve: fixed 0x20 with retransmit
bcf3f4b made query_finalize() to be called on
each outbound query before sending, so each
retransmitted query got different 0x20 case
and the only responses from the latest contacted
NS matched.
reverted back the old behaviour where query case
is randomised when an outbound query is generated,
not before sending
Marek Vavrusa [Tue, 23 Aug 2016 02:56:11 +0000 (19:56 -0700)]
lib/resolve: fixed pass through for stub mode
REFUSED response no longer causes retry in
iterator when operating in stub mode
Marek Vavrusa [Tue, 23 Aug 2016 02:07:19 +0000 (19:07 -0700)]
modules/daf: allow forwarding to custom port
example:
> daf.add 'forward 127.0.0.1@5353'
Ondřej Surý [Tue, 23 Aug 2016 12:22:42 +0000 (14:22 +0200)]
Print protocol used in verbose mode
Karel Slany [Tue, 23 Aug 2016 09:14:47 +0000 (11:14 +0200)]
Fixed error: added missing struct kr_query entry into Lua wrapper.
The missing entry caused some entries to be dear and written to wrong
positions.
Ondřej Surý [Wed, 17 Aug 2016 12:47:28 +0000 (14:47 +0200)]
Update script to print all 16 bytes of IPv6 addr
Ondřej Surý [Wed, 17 Aug 2016 12:45:56 +0000 (14:45 +0200)]
Add last missing byte to IPv6 root hints
Ondřej Surý [Wed, 17 Aug 2016 12:40:10 +0000 (14:40 +0200)]
lib/zonecut.c: cleanup
Ondřej Surý [Wed, 17 Aug 2016 12:38:00 +0000 (14:38 +0200)]
Correctly encode IPv6 addresses in root hints to prevent to uint16_t conversion
Ondřej Surý [Mon, 15 Aug 2016 13:00:34 +0000 (15:00 +0200)]
Fix missing 'else' in hexval2char()
Ondřej Surý [Mon, 15 Aug 2016 12:57:50 +0000 (14:57 +0200)]
whitespace cleanups
Ondřej Surý [Mon, 15 Aug 2016 12:57:50 +0000 (14:57 +0200)]
whitespace cleanups
Ondřej Surý [Mon, 15 Aug 2016 07:58:11 +0000 (09:58 +0200)]
Read EnvironmentFile and user $KRESD_ARGS
Ondřej Surý [Mon, 15 Aug 2016 07:35:14 +0000 (09:35 +0200)]
Update systemd units to be named after daemon
Marek Vavrusa [Thu, 11 Aug 2016 23:41:37 +0000 (16:41 -0700)]
changelog: updated to 1.1.0
Grigorii Demidov [Wed, 10 Aug 2016 08:24:27 +0000 (10:24 +0200)]
lib/resolve: empty final answer when SERVFAIL
Marek Vavrusa [Thu, 11 Aug 2016 22:32:43 +0000 (00:32 +0200)]
Merge branch 'cookies-wip' into 'master'
DNS Cookies
Second merge request introducing DNS cookies.
See merge request !38
Ondřej Surý [Thu, 11 Aug 2016 12:06:30 +0000 (14:06 +0200)]
Delete static and shared library
Karel Slany [Wed, 10 Aug 2016 14:36:49 +0000 (16:36 +0200)]
Fixed an error that caused the integration tests to fail.
EDNS data from the packet must be erased before attempting to send the
query again.
Marek Vavrusa [Tue, 9 Aug 2016 20:54:44 +0000 (13:54 -0700)]
build: fixed build, removed unused variables
Marek Vavrusa [Tue, 9 Aug 2016 20:54:26 +0000 (13:54 -0700)]
build: fixed build with libknot<2.3 without cookies
the cookies require libknot>=2.3, Makefile didn't
check for that, and turning cookies off wasn't
possible either
Karel Slany [Tue, 9 Aug 2016 13:45:46 +0000 (15:45 +0200)]
Fixed a possible memory leak.
Karel Slany [Tue, 9 Aug 2016 11:00:48 +0000 (13:00 +0200)]
Removed or rephrased some comments.
Karel Slany [Tue, 9 Aug 2016 10:28:24 +0000 (12:28 +0200)]
Deleted code that has already been commented out.
Karel Slany [Fri, 5 Aug 2016 12:09:31 +0000 (14:09 +0200)]
Reduced the number of kr_answer_write_cookie() arguments.
Karel Slany [Thu, 4 Aug 2016 14:29:05 +0000 (16:29 +0200)]
Function kr_rplan_push() fails again with null name.
Introduced kr_rplan_push_empty() to create empty query for DNS cookies.
Karel Slany [Thu, 4 Aug 2016 14:26:15 +0000 (16:26 +0200)]
Removed qdcount from struct kr_query.
Karel Slany [Thu, 4 Aug 2016 14:16:56 +0000 (16:16 +0200)]
Adapted to recent libknot changes.
Karel Slany [Thu, 4 Aug 2016 10:26:48 +0000 (12:26 +0200)]
Disabled TCP fallback on BADCOOKIE response. Failing instead.
Karel Slany [Sun, 31 Jul 2016 14:49:27 +0000 (16:49 +0200)]
Removed the shallow copy from configuration code in cookie module.
Karel Slany [Sun, 31 Jul 2016 10:25:25 +0000 (12:25 +0200)]
Added checks for FAIL and DONE when calling cookie module functions.
Karel Slany [Tue, 26 Jul 2016 13:39:20 +0000 (15:39 +0200)]
Merged similar code into one function.
Karel Slany [Tue, 26 Jul 2016 11:40:14 +0000 (13:40 +0200)]
Removed comment that was out of place.
Karel Slany [Tue, 26 Jul 2016 11:07:05 +0000 (13:07 +0200)]
Made some function parameters const.
Karel Slany [Tue, 26 Jul 2016 10:35:16 +0000 (12:35 +0200)]
Renamed kr_resolve_query_finalize() to kr_resolve_checkout().