]> granicus.if.org Git - pdns/log
pdns
7 years agoMerge pull request #4758 from rgacogne/rec-dq-on-stack
Remi Gacogne [Tue, 20 Dec 2016 08:45:23 +0000 (09:45 +0100)]
Merge pull request #4758 from rgacogne/rec-dq-on-stack

rec: Allocate the DNSQuestion `dq` object on the stack

7 years agoMerge pull request #4784 from rgacogne/dnsdist-doc-first-available
Remi Gacogne [Tue, 20 Dec 2016 08:40:00 +0000 (09:40 +0100)]
Merge pull request #4784 from rgacogne/dnsdist-doc-first-available

dnsdist: Fix the `firstAvailable` policy description

7 years agoMerge pull request #4783 from rgacogne/atomic-powerpc
Remi Gacogne [Tue, 20 Dec 2016 08:27:09 +0000 (09:27 +0100)]
Merge pull request #4783 from rgacogne/atomic-powerpc

Add -latomic on powerpc

7 years agoMerge pull request #3869 from rgacogne/rec-outgoing-protobuf
Remi Gacogne [Mon, 19 Dec 2016 13:29:34 +0000 (14:29 +0100)]
Merge pull request #3869 from rgacogne/rec-outgoing-protobuf

rec: Log outgoing queries / incoming responses via protobuf

7 years agodnsdist: Fix the `firstAvailable` policy description
Remi Gacogne [Mon, 19 Dec 2016 08:58:53 +0000 (09:58 +0100)]
dnsdist: Fix the `firstAvailable` policy description

It doesn't use the server's `order`, except when falling back to
`leastOutstanding`.

7 years agoAdd -latomic on powerpc
Remi Gacogne [Sun, 18 Dec 2016 15:03:47 +0000 (16:03 +0100)]
Add -latomic on powerpc

7 years agoMerge pull request #4539 from pieterlexis/remove-unused-var
Pieter Lexis [Fri, 16 Dec 2016 17:43:28 +0000 (18:43 +0100)]
Merge pull request #4539 from pieterlexis/remove-unused-var

Remove 'kind' param in DNSBackend::getDomainKeys

7 years agoMerge pull request #4744 from rgacogne/handle-closesocket-excp
Pieter Lexis [Fri, 16 Dec 2016 11:39:17 +0000 (12:39 +0100)]
Merge pull request #4744 from rgacogne/handle-closesocket-excp

Handle exceptions raised by `closesocket()`

7 years agorec: Wait until after daemonizing to start the outgoing protobuf thread
Remi Gacogne [Fri, 16 Dec 2016 09:40:55 +0000 (10:40 +0100)]
rec: Wait until after daemonizing to start the outgoing protobuf thread

7 years agorec: Log outgoing queries / incoming responses via protobuf
Remi Gacogne [Fri, 4 Nov 2016 16:28:22 +0000 (17:28 +0100)]
rec: Log outgoing queries / incoming responses via protobuf

7 years agoMerge pull request #4584 from tuxis-ie/pdnsutil-account
Pieter Lexis [Fri, 16 Dec 2016 08:50:56 +0000 (09:50 +0100)]
Merge pull request #4584 from tuxis-ie/pdnsutil-account

Allow setting the account of a zone via pdnsutil

7 years agoMerge pull request #4627 from tuxis-ie/clearify-soa-edit-api-doc
Pieter Lexis [Fri, 16 Dec 2016 08:39:22 +0000 (09:39 +0100)]
Merge pull request #4627 from tuxis-ie/clearify-soa-edit-api-doc

Add link to options of SOA-EDIT-API

7 years agoMerge pull request #4767 from Habbie/rpz-hidettl
Pieter Lexis [Fri, 16 Dec 2016 08:38:16 +0000 (09:38 +0100)]
Merge pull request #4767 from Habbie/rpz-hidettl

hide ttl in RPZ tests to avoid random failures

7 years agoMerge pull request #4772 from pieterlexis/dnsdist-contrib-init
Pieter Lexis [Fri, 16 Dec 2016 08:38:02 +0000 (09:38 +0100)]
Merge pull request #4772 from pieterlexis/dnsdist-contrib-init

Fix dnsdist initscript config check

7 years agoFix dnsdist initscript config check
Pieter Lexis [Thu, 15 Dec 2016 12:53:35 +0000 (13:53 +0100)]
Fix dnsdist initscript config check

7 years agoMerge pull request #4769 from rgacogne/rec-init-rcode-before-preresolve
Remi Gacogne [Thu, 15 Dec 2016 09:29:56 +0000 (10:29 +0100)]
Merge pull request #4769 from rgacogne/rec-init-rcode-before-preresolve

rec: Set the result to NoError before calling `preresolve`

7 years agorec: Clean up a weird construct left over from the shared_ptr -> stack move
Remi Gacogne [Thu, 15 Dec 2016 09:23:04 +0000 (10:23 +0100)]
rec: Clean up a weird construct left over from the shared_ptr -> stack move

7 years agoMerge pull request #4759 from rgacogne/dnsdist-110-beta2-changelog
Remi Gacogne [Wed, 14 Dec 2016 11:41:55 +0000 (12:41 +0100)]
Merge pull request #4759 from rgacogne/dnsdist-110-beta2-changelog

dnsdist: Update ChangeLog for 1.1.0-beta2

7 years agodnsdist: Add #4748 to the ChangeLog
Remi Gacogne [Wed, 14 Dec 2016 11:02:12 +0000 (12:02 +0100)]
dnsdist: Add #4748 to the ChangeLog

7 years agoMerge pull request #4748 from rgacogne/dnsdist-cache-cleaning-percentage dnsdist-1.1.0-beta2
Remi Gacogne [Wed, 14 Dec 2016 11:00:33 +0000 (12:00 +0100)]
Merge pull request #4748 from rgacogne/dnsdist-cache-cleaning-percentage

dnsdist: Add `setCacheCleaningPercentage()`

7 years agodnsdist: Add #4764 and #4765 to the beta2 ChangeLog
Remi Gacogne [Wed, 14 Dec 2016 09:58:36 +0000 (10:58 +0100)]
dnsdist: Add #4764 and #4765 to the beta2 ChangeLog

7 years agoMerge pull request #4764 from rgacogne/dnsdist-tcp-workers-vect-race
Remi Gacogne [Wed, 14 Dec 2016 09:53:25 +0000 (10:53 +0100)]
Merge pull request #4764 from rgacogne/dnsdist-tcp-workers-vect-race

dnsdist: Prevent race while creating new TCP worker threads

7 years agoMerge pull request #4765 from pieterlexis/dnsdist-improvements
Remi Gacogne [Wed, 14 Dec 2016 09:52:33 +0000 (10:52 +0100)]
Merge pull request #4765 from pieterlexis/dnsdist-improvements

DNSDist: some service improvements

7 years agorec: Set the result to NoError before calling `preresolve`
Remi Gacogne [Tue, 13 Dec 2016 15:21:17 +0000 (16:21 +0100)]
rec: Set the result to NoError before calling `preresolve`

Otherwise `rq.rcode` needs to be set explicitly when handling the
query from `preresolve`, which is not documented and wasn't the case
before.

7 years agohide ttl in RPZ tests to avoid random failures
Peter van Dijk [Tue, 13 Dec 2016 13:35:07 +0000 (14:35 +0100)]
hide ttl in RPZ tests to avoid random failures

7 years agoMerge pull request #4751 from zeha/api-decline-mixed-ns
Peter van Dijk [Tue, 13 Dec 2016 12:37:21 +0000 (13:37 +0100)]
Merge pull request #4751 from zeha/api-decline-mixed-ns

API: prevent sending nameservers list and zone-level NS in rrsets

7 years agoMerge pull request #4763 from desec-io/master
Peter van Dijk [Tue, 13 Dec 2016 11:24:16 +0000 (12:24 +0100)]
Merge pull request #4763 from desec-io/master

Extended pdns_control man page: pdns_control notify *

7 years agodnsdist: check config before starting
Pieter Lexis [Tue, 13 Dec 2016 10:11:25 +0000 (11:11 +0100)]
dnsdist: check config before starting

7 years agodnsdist: Ignore file created by autoreconf
Pieter Lexis [Tue, 13 Dec 2016 10:07:25 +0000 (11:07 +0100)]
dnsdist: Ignore file created by autoreconf

7 years agoExtended pdns_control man page
Nils Wisiol [Mon, 12 Dec 2016 20:08:22 +0000 (21:08 +0100)]
Extended pdns_control man page

7 years agodnsdist: Check the vector capacity before creating the TCP worker thread
Remi Gacogne [Tue, 13 Dec 2016 09:35:10 +0000 (10:35 +0100)]
dnsdist: Check the vector capacity before creating the TCP worker thread

7 years agodnsdist: document --check-config in --help
Pieter Lexis [Tue, 13 Dec 2016 08:49:29 +0000 (09:49 +0100)]
dnsdist: document --check-config in --help

7 years agoMerge pull request #4760 from rgacogne/remote-logger-set-invalid-on-close
Remi Gacogne [Tue, 13 Dec 2016 08:41:08 +0000 (09:41 +0100)]
Merge pull request #4760 from rgacogne/remote-logger-set-invalid-on-close

Set `RemoteLogger::d_socket` to -1 after closing it

7 years agodnsdist: Add #4541 to the ChangeLog
Remi Gacogne [Mon, 12 Dec 2016 16:28:55 +0000 (17:28 +0100)]
dnsdist: Add #4541 to the ChangeLog

7 years agoMerge pull request #4541 from rgacogne/fix-suffix-match-tree
Remi Gacogne [Mon, 12 Dec 2016 16:22:00 +0000 (17:22 +0100)]
Merge pull request #4541 from rgacogne/fix-suffix-match-tree

dnsdist: Fix insertion issues in SuffixMatchTree, move it to dnsname.hh

7 years agodnsdist: Prevent race while creating new TCP worker threads
Remi Gacogne [Mon, 12 Dec 2016 15:28:17 +0000 (16:28 +0100)]
dnsdist: Prevent race while creating new TCP worker threads

We try very hard to avoid using locks, but we need to prevent two
threads inserting into the TCP workers vector concurrently. While
this can't happen at runtime since the healthcheck thread is the
only one calling `g_tcpclientthreads->addTCPClientThread()`, this
might happen at startup time because we start the TCP acceptor
threads one after another and they all call it once.
This might result, for example, in one vector entry being overwritten
and another one remaining value-initialized to zero.

7 years agoSet `RemoteLogger::d_socket` to -1 after closing it
Remi Gacogne [Mon, 12 Dec 2016 11:20:32 +0000 (12:20 +0100)]
Set `RemoteLogger::d_socket` to -1 after closing it

Otherwise, in the unlikely case `SSocket()` throws an exception
we might end up with a stale file descriptor in `RemoteLogger::reconnect()`.

7 years agodnsdist: Update ChangeLog for 1.1.0-beta2
Remi Gacogne [Mon, 12 Dec 2016 10:00:56 +0000 (11:00 +0100)]
dnsdist: Update ChangeLog for 1.1.0-beta2

7 years agorec: Allocate the DNSQuestion `dq` object on the stack
Remi Gacogne [Mon, 12 Dec 2016 09:04:13 +0000 (10:04 +0100)]
rec: Allocate the DNSQuestion `dq` object on the stack

We don't need to allocate a `shared_ptr` for each query.

7 years agoMerge pull request #4753 from rgacogne/dnsdist-tcp-fixes
Remi Gacogne [Mon, 12 Dec 2016 08:18:02 +0000 (09:18 +0100)]
Merge pull request #4753 from rgacogne/dnsdist-tcp-fixes

dnsdist: Fix FD leak on TCP connection failure, handle TCP worker creation failure

7 years agodnsdist: Don't leak a FD if the TCP connection to the backend fails
Remi Gacogne [Fri, 9 Dec 2016 16:09:25 +0000 (17:09 +0100)]
dnsdist: Don't leak a FD if the TCP connection to the backend fails

7 years agodnsdist: Better handling of failures during TCP worker thread creation
Remi Gacogne [Fri, 9 Dec 2016 16:08:04 +0000 (17:08 +0100)]
dnsdist: Better handling of failures during TCP worker thread creation

7 years agoRemove 'kind' param in DNSBackend::getDomainKeys
Pieter Lexis [Wed, 5 Oct 2016 14:48:00 +0000 (16:48 +0200)]
Remove 'kind' param in DNSBackend::getDomainKeys

It was unused anyway. Closes #4493

7 years agoMerge pull request #4566 from pieterlexis/dnsheader-in-dnsquestion
Pieter Lexis [Fri, 9 Dec 2016 13:53:54 +0000 (14:53 +0100)]
Merge pull request #4566 from pieterlexis/dnsheader-in-dnsquestion

DNS Header and EDNS Flag access for Lua

7 years agoFix indenting in recursor scripting docs
Pieter Lexis [Thu, 13 Oct 2016 16:05:01 +0000 (18:05 +0200)]
Fix indenting in recursor scripting docs

7 years agoExpose EDNS Flags to Lua
Pieter Lexis [Thu, 13 Oct 2016 16:04:25 +0000 (18:04 +0200)]
Expose EDNS Flags to Lua

Closes #4531

7 years agoLua: Give access to the dnsheader
Pieter Lexis [Thu, 13 Oct 2016 16:03:37 +0000 (18:03 +0200)]
Lua: Give access to the dnsheader

7 years agoMerge pull request #4638 from rgacogne/auth-bindbackend-zoneid-lookup
Pieter Lexis [Fri, 9 Dec 2016 08:59:23 +0000 (09:59 +0100)]
Merge pull request #4638 from rgacogne/auth-bindbackend-zoneid-lookup

auth: In `Bind2Backend::lookup()`, use the `zoneId` when we have it

7 years agoMerge pull request #4684 from hlindqvist/clarify-activate-tsig
Pieter Lexis [Fri, 9 Dec 2016 08:58:37 +0000 (09:58 +0100)]
Merge pull request #4684 from hlindqvist/clarify-activate-tsig

Clarify pdnsutil activate-tsig-key description

7 years agoMerge pull request #4686 from rgacogne/calidns-not-enough-queries-crash
Pieter Lexis [Fri, 9 Dec 2016 08:58:09 +0000 (09:58 +0100)]
Merge pull request #4686 from rgacogne/calidns-not-enough-queries-crash

calidns: Don't crash if we don't have enough 'unknown' queries remaining

7 years agoMerge pull request #4715 from rgacogne/dnsmessage-proto-set-version-2
Pieter Lexis [Fri, 9 Dec 2016 08:57:09 +0000 (09:57 +0100)]
Merge pull request #4715 from rgacogne/dnsmessage-proto-set-version-2

Specify that dnsmessage.proto uses protobuf version 2

7 years agoMerge pull request #4724 from rgacogne/rec-lua-thread-id
Pieter Lexis [Fri, 9 Dec 2016 08:56:49 +0000 (09:56 +0100)]
Merge pull request #4724 from rgacogne/rec-lua-thread-id

rec: Add `getRecursorThreadId()` to Lua, identifying the current thread

7 years agoAPI: prevent sending nameservers list and zone-level NS in rrsets
Christian Hofstaedtler [Fri, 15 Jul 2016 14:08:21 +0000 (16:08 +0200)]
API: prevent sending nameservers list and zone-level NS in rrsets

7 years agoAdd documentation in the manpage
Mark Schouten [Thu, 8 Dec 2016 14:05:24 +0000 (15:05 +0100)]
Add documentation in the manpage

7 years agoRemove useless 'meta'
Mark Schouten [Tue, 18 Oct 2016 14:12:19 +0000 (16:12 +0200)]
Remove useless 'meta'

7 years agoAllow setting the account of a zone via pdnsutil
Mark Schouten [Tue, 18 Oct 2016 13:51:36 +0000 (15:51 +0200)]
Allow setting the account of a zone via pdnsutil

7 years agoMerge pull request #4564 from rgacogne/rec-public-dnsquestion
Peter van Dijk [Thu, 8 Dec 2016 14:09:47 +0000 (15:09 +0100)]
Merge pull request #4564 from rgacogne/rec-public-dnsquestion

rec: Pass a `DNSQuestion` object to Lua hooks

7 years agoMerge pull request #4749 from Habbie/test-counters-latency
Peter van Dijk [Thu, 8 Dec 2016 12:05:40 +0000 (13:05 +0100)]
Merge pull request #4749 from Habbie/test-counters-latency

remove unreliable `latency` variable from counters test

7 years agoMerge pull request #4746 from rgacogne/auth-pdnsutil-coverity-1366826
Peter van Dijk [Thu, 8 Dec 2016 12:05:30 +0000 (13:05 +0100)]
Merge pull request #4746 from rgacogne/auth-pdnsutil-coverity-1366826

auth: Fix coverity warning in `pdnsutil show-zone`

7 years agoMerge pull request #4535 from rgacogne/dnsdist-lua-do
Remi Gacogne [Thu, 8 Dec 2016 11:15:13 +0000 (12:15 +0100)]
Merge pull request #4535 from rgacogne/dnsdist-lua-do

dnsdist: Add `DNSQuestion:getDO()`

7 years agoMerge pull request #4702 from rgacogne/dnsdist-udp-timeout
Remi Gacogne [Thu, 8 Dec 2016 09:09:28 +0000 (10:09 +0100)]
Merge pull request #4702 from rgacogne/dnsdist-udp-timeout

dnsdist: Add `setUDPTimeout(n)`

7 years agoMerge pull request #4726 from rgacogne/dnsdist-servfail-no-server
Remi Gacogne [Thu, 8 Dec 2016 09:09:04 +0000 (10:09 +0100)]
Merge pull request #4726 from rgacogne/dnsdist-servfail-no-server

dnsdist: Add an option to return ServFail when no server is available

7 years agoMerge pull request #4743 from rgacogne/dnsdist-client-bpf
Remi Gacogne [Thu, 8 Dec 2016 09:07:10 +0000 (10:07 +0100)]
Merge pull request #4743 from rgacogne/dnsdist-client-bpf

dnsdist: Ignore newBPFFilter() and newDynBPFFilter() in client mode

7 years agoremove unreliable `latency` variable from counters test
Peter van Dijk [Tue, 6 Dec 2016 15:56:55 +0000 (16:56 +0100)]
remove unreliable `latency` variable from counters test

7 years agoMerge pull request #4745 from Habbie/showrule-plural
Peter van Dijk [Tue, 6 Dec 2016 15:45:59 +0000 (16:45 +0100)]
Merge pull request #4745 from Habbie/showrule-plural

add missing letter, plus format

7 years agoadd missing letter, plus format
Peter van Dijk [Tue, 6 Dec 2016 09:53:35 +0000 (10:53 +0100)]
add missing letter, plus format

7 years agoMerge pull request #4742 from rgacogne/dnsdist-tcp-queued-counter
Remi Gacogne [Tue, 6 Dec 2016 09:14:53 +0000 (10:14 +0100)]
Merge pull request #4742 from rgacogne/dnsdist-tcp-queued-counter

dnsdist: Decrement the queued TCP conn count if writing to the pipe fails

7 years agoauth: Fix coverity warning in `pdnsutil show-zone`
Remi Gacogne [Tue, 6 Dec 2016 09:08:55 +0000 (10:08 +0100)]
auth: Fix coverity warning in `pdnsutil show-zone`

7 years agodnsdist: Decrement the queued TCP conn count if writing to the pipe fails
Remi Gacogne [Mon, 5 Dec 2016 17:01:55 +0000 (18:01 +0100)]
dnsdist: Decrement the queued TCP conn count if writing to the pipe fails

Otherwise we might end up refusing every new TCP connection until
we are restarted.

7 years agodnsdist: Add an option to return ServFail when no server is available
Remi Gacogne [Fri, 2 Dec 2016 14:05:36 +0000 (15:05 +0100)]
dnsdist: Add an option to return ServFail when no server is available

7 years agodnsdist: Ignore newBPFFilter() and newDynBPFFilter() in client mode
Remi Gacogne [Mon, 5 Dec 2016 16:23:40 +0000 (17:23 +0100)]
dnsdist: Ignore newBPFFilter() and newDynBPFFilter() in client mode

7 years agoMerge pull request #4740 from Habbie/fix-show-zone-ds
Peter van Dijk [Mon, 5 Dec 2016 16:23:25 +0000 (17:23 +0100)]
Merge pull request #4740 from Habbie/fix-show-zone-ds

avoid undefined behaviour in clang vs. gcc

7 years agoHandle exceptions raised by `closesocket()`
Remi Gacogne [Mon, 5 Dec 2016 15:42:55 +0000 (16:42 +0100)]
Handle exceptions raised by `closesocket()`

This was not very well handled, and could cause the PowerDNS process
to terminate. This is especially nasty when `closesocket()` is called
from a destructor, as we could already be dealing with an exception.

7 years agoavoid undefined behaviour in clang vs. gcc
Peter van Dijk [Mon, 5 Dec 2016 15:29:49 +0000 (16:29 +0100)]
avoid undefined behaviour in clang vs. gcc

7 years agoMerge pull request #4696 from ju5t/doc-rectify-secure-all-zones
Peter van Dijk [Mon, 5 Dec 2016 14:06:40 +0000 (15:06 +0100)]
Merge pull request #4696 from ju5t/doc-rectify-secure-all-zones

Add rectify- and secure-all-zones documentation

7 years agoMake export-zone-ds output similar to export-zone-dnskey
Pieter Lexis [Mon, 5 Dec 2016 13:53:06 +0000 (13:53 +0000)]
Make export-zone-ds output similar to export-zone-dnskey

7 years agoMerge branch 'horazont-feature/pdnsutil-export-zone-ds-showZone'
Pieter Lexis [Mon, 5 Dec 2016 11:44:32 +0000 (11:44 +0000)]
Merge branch 'horazont-feature/pdnsutil-export-zone-ds-showZone'

7 years agoMerge branch 'feature/pdnsutil-export-zone-ds-showZone' of https://github.com/horazon...
Pieter Lexis [Mon, 5 Dec 2016 11:40:04 +0000 (11:40 +0000)]
Merge branch 'feature/pdnsutil-export-zone-ds-showZone' of https://github.com/horazont/pdns into horazont-feature/pdnsutil-export-zone-ds-showZone

7 years agoMerge pull request #4734 from rgacogne/dnsdist-tcp-ssocket-exception
bert hubert [Sun, 4 Dec 2016 22:36:54 +0000 (23:36 +0100)]
Merge pull request #4734 from rgacogne/dnsdist-tcp-ssocket-exception

dnsdist: Add the TCP socket to the map only if the connection succeeds. Closes #4733.

7 years agorec: Add `getRecursorThreadId()` to Lua, identifying the current thread
Remi Gacogne [Thu, 1 Dec 2016 14:58:01 +0000 (15:58 +0100)]
rec: Add `getRecursorThreadId()` to Lua, identifying the current thread

7 years agodnsdist: Add the TCP socket to the map only if the connection succeeds
Remi Gacogne [Sun, 4 Dec 2016 20:09:37 +0000 (21:09 +0100)]
dnsdist: Add the TCP socket to the map only if the connection succeeds

Otherwise we create a value-initialized (to 0) entry in the map and
try to use it later.

7 years agoMerge pull request #4722 from rgacogne/dnsname-4718
bert hubert [Sat, 3 Dec 2016 19:51:14 +0000 (19:51 +0000)]
Merge pull request #4722 from rgacogne/dnsname-4718

Fix incorrect length check in `DNSName` when extracting qtype or qclass

7 years agoMerge pull request #4725 from Habbie/travis-update
Peter van Dijk [Fri, 2 Dec 2016 19:05:33 +0000 (20:05 +0100)]
Merge pull request #4725 from Habbie/travis-update

conform to updated travis image

7 years agoMySQL 5.6 is now installed by default in travis images
Remi Gacogne [Fri, 2 Dec 2016 16:05:42 +0000 (17:05 +0100)]
MySQL 5.6 is now installed by default in travis images

See https://github.com/travis-ci/travis-ci/issues/6961

7 years agostop auto-started pdns with 0.0.0.0 bind, to allow individual binds
Peter van Dijk [Fri, 2 Dec 2016 13:01:57 +0000 (14:01 +0100)]
stop auto-started pdns with 0.0.0.0 bind, to allow individual binds

7 years agoMerge pull request #4721 from rgacogne/dnsdist-exceptions-responder-thread
Remi Gacogne [Thu, 1 Dec 2016 12:10:55 +0000 (13:10 +0100)]
Merge pull request #4721 from rgacogne/dnsdist-exceptions-responder-thread

dnsdist: Handle exceptions in the UDP responder thread

7 years agoFix incorrect length check in `DNSName` when extracting qtype or qclass
Remi Gacogne [Thu, 1 Dec 2016 12:00:13 +0000 (13:00 +0100)]
Fix incorrect length check in `DNSName` when extracting qtype or qclass

In `DNSName::packetParser()`, the length check might have been incorrect
when the caller asked for the `qtype` and/or the `qclass` to be extracted.
The `pos + labellen + 2 > end` check was wrong because `pos` might have already
been incremented by `labellen`. There are 3 ways to exit the main loop:

* `labellen` is 0, the most common case, and in that case the check is valid
* `pos >= end`, meaning that `pos + labellen + 2 > end` will be true regardless
of the value of `labellen` since it cannot be negative
* if `uncompress` is set and a compressed label is found, the main loop is
broken out of, and `labellen` still holds a now irrelevant, possibly non-zero value
corresponding to the first byte of the compressed label length & ~0xc0.

In that last case, if the compressed label points to a position > 255 the check
is wrong and might have rejected a valid packet.
A quick look throught the code didn't show any place where we request decompression
and ask for `qtype` and/or `qclass` in a response, but I might have missed one.

Reported by Houssam El Hajoui (thanks!).

7 years agodnsdist: Handle exceptions in the UDP responder thread
Remi Gacogne [Thu, 1 Dec 2016 10:39:40 +0000 (11:39 +0100)]
dnsdist: Handle exceptions in the UDP responder thread

Since we now have response rules, it makes sense to gracefully handle
exceptions in the UDP responder thread as well.

7 years agoMerge pull request #4720 from Habbie/stalettl
Peter van Dijk [Thu, 1 Dec 2016 10:13:34 +0000 (11:13 +0100)]
Merge pull request #4720 from Habbie/stalettl

doc nit

7 years agonit
Peter van Dijk [Thu, 1 Dec 2016 10:10:54 +0000 (11:10 +0100)]
nit

7 years agoMerge pull request #4622 from tuxis-ie/no.more.dots.ever
Peter van Dijk [Wed, 30 Nov 2016 18:38:36 +0000 (19:38 +0100)]
Merge pull request #4622 from tuxis-ie/no.more.dots.ever

According to IRC, this should fix #4621

7 years agodnsdist: Add `DNSQuestion:getDO()`
Remi Gacogne [Wed, 5 Oct 2016 10:52:07 +0000 (12:52 +0200)]
dnsdist: Add `DNSQuestion:getDO()`

7 years agoMerge pull request #4716 from rgacogne/remove-debug-dq-setrecords
Remi Gacogne [Wed, 30 Nov 2016 13:19:07 +0000 (14:19 +0100)]
Merge pull request #4716 from rgacogne/remove-debug-dq-setrecords

rec: Remove leftover debug msg in `RecursorLua4::DNSQuestion::setRecords()`

7 years agorec: Remove leftover debug msg in `RecursorLua4::DNSQuestion::setRecords()`
Remi Gacogne [Tue, 29 Nov 2016 08:51:13 +0000 (09:51 +0100)]
rec: Remove leftover debug msg in `RecursorLua4::DNSQuestion::setRecords()`

7 years agoSpecify that dnsmessage.proto uses protobuf version 2
Remi Gacogne [Tue, 29 Nov 2016 08:48:36 +0000 (09:48 +0100)]
Specify that dnsmessage.proto uses protobuf version 2

Recent proto-c versions are complaining loudly otherwise.

7 years agodnsdist: Add `setUDPTimeout(n)`
Remi Gacogne [Wed, 23 Nov 2016 08:43:40 +0000 (09:43 +0100)]
dnsdist: Add `setUDPTimeout(n)`

8 years agodnsdist: Fix a typo in the dynamic blocks regression tests
Remi Gacogne [Fri, 18 Nov 2016 13:50:19 +0000 (14:50 +0100)]
dnsdist: Fix a typo in the dynamic blocks regression tests

8 years agoAdd rectify- and secure-all-zones documentation
ju5t [Fri, 18 Nov 2016 13:01:28 +0000 (14:01 +0100)]
Add rectify- and secure-all-zones documentation

8 years agoMerge pull request #4578 from rgacogne/dnsdist-protobuf-fix-dest-addr
Remi Gacogne [Fri, 18 Nov 2016 10:36:58 +0000 (11:36 +0100)]
Merge pull request #4578 from rgacogne/dnsdist-protobuf-fix-dest-addr

dnsdist: Fix destination address reporting

8 years agoMerge pull request #4693 from rgacogne/dnsdist-flexible-dynblocks-tests
Remi Gacogne [Fri, 18 Nov 2016 10:34:32 +0000 (11:34 +0100)]
Merge pull request #4693 from rgacogne/dnsdist-flexible-dynblocks-tests

dnsdist: Be more flexible in the DynBlocks regression tests