]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
4 years agoAdd (domain-)cache-ttl to gsqlite3-master CI
Chris Hofstaedtler [Tue, 18 May 2021 12:10:38 +0000 (14:10 +0200)] 
Add (domain-)cache-ttl to gsqlite3-master CI

4 years agoTreat vanished domains like they were never in the cache
Chris Hofstaedtler [Tue, 18 May 2021 07:56:21 +0000 (09:56 +0200)] 
Treat vanished domains like they were never in the cache

4 years agogetAuth: abort if backend returned wrong SOA for cached domain
Chris Hofstaedtler [Sat, 15 May 2021 22:10:59 +0000 (00:10 +0200)] 
getAuth: abort if backend returned wrong SOA for cached domain

4 years agogetAuth: avoid throwing when no SOA is returned for cached domain
Chris Hofstaedtler [Sat, 15 May 2021 22:10:42 +0000 (00:10 +0200)] 
getAuth: avoid throwing when no SOA is returned for cached domain

4 years agoauth-domaincache: use info-zone-query for inserted zone id
Chris Hofstaedtler [Mon, 10 May 2021 08:28:35 +0000 (10:28 +0200)] 
auth-domaincache: use info-zone-query for inserted zone id

Also apply "RETURNING id" optimization for postgresql.

4 years agolmdbbackend/createDomain: reuse RW transaction
Chris Hofstaedtler [Mon, 10 May 2021 15:29:42 +0000 (17:29 +0200)] 
lmdbbackend/createDomain: reuse RW transaction

4 years agoauth-domaincache: apply suggested comment improvement
Chris Hofstaedtler [Wed, 12 May 2021 09:37:28 +0000 (11:37 +0200)] 
auth-domaincache: apply suggested comment improvement

4 years agoApply clang-format
Chris Hofstaedtler [Mon, 10 May 2021 08:31:12 +0000 (10:31 +0200)] 
Apply clang-format

4 years agoauth-domaincache: add "new" headers
Chris Hofstaedtler [Mon, 10 May 2021 08:27:55 +0000 (10:27 +0200)] 
auth-domaincache: add "new" headers

4 years agosetReplacePending: avoid lock
Chris Hofstaedtler [Mon, 10 May 2021 08:16:10 +0000 (10:16 +0200)] 
setReplacePending: avoid lock

4 years agotest-auth-domaincache_cc: check zoneId value explicitly
Chris Hofstaedtler [Mon, 10 May 2021 08:15:33 +0000 (10:15 +0200)] 
test-auth-domaincache_cc: check zoneId value explicitly

4 years agoTidy up style nits
Chris Hofstaedtler [Mon, 10 May 2021 08:12:59 +0000 (10:12 +0200)] 
Tidy up style nits

4 years agodomaincache: preserve domains added while replace data collection was running
Chris Hofstaedtler [Mon, 29 Mar 2021 13:49:39 +0000 (15:49 +0200)] 
domaincache: preserve domains added while replace data collection was running

4 years agoReformat
Chris Hofstaedtler [Mon, 15 Mar 2021 09:05:27 +0000 (10:05 +0100)] 
Reformat

4 years agoRemove unused d_ops
Chris Hofstaedtler [Sun, 14 Mar 2021 21:57:23 +0000 (22:57 +0100)] 
Remove unused d_ops

4 years agoAdd separate auth domain cache test
Chris Hofstaedtler [Mon, 8 Feb 2021 12:51:04 +0000 (13:51 +0100)] 
Add separate auth domain cache test

4 years agoAuthDomainCache: init d_ttl
Chris Hofstaedtler [Mon, 8 Feb 2021 12:34:09 +0000 (13:34 +0100)] 
AuthDomainCache: init d_ttl

4 years agoAuthDomainCache: use std::move
Chris Hofstaedtler [Mon, 8 Feb 2021 12:33:58 +0000 (13:33 +0100)] 
AuthDomainCache: use std::move

4 years agoMove extern AuthDomainCache into auth-domaincache.hh
Chris Hofstaedtler [Mon, 8 Feb 2021 12:33:47 +0000 (13:33 +0100)] 
Move extern AuthDomainCache into auth-domaincache.hh

4 years agoEnable domain cache on gsql tests
Chris Hofstaedtler [Thu, 29 Oct 2020 11:59:02 +0000 (12:59 +0100)] 
Enable domain cache on gsql tests

4 years agoAvoid abort if database server goes away
Chris Hofstaedtler [Thu, 29 Oct 2020 11:54:43 +0000 (12:54 +0100)] 
Avoid abort if database server goes away

4 years agoauth: add a cache of existing domains
Chris Hofstaedtler [Mon, 19 Oct 2020 14:21:17 +0000 (16:21 +0200)] 
auth: add a cache of existing domains

4 years agoMerge pull request #10397 from aj-gh/fixdoc-refreshonttlperc
Otto Moerbeek [Wed, 12 May 2021 14:24:01 +0000 (16:24 +0200)] 
Merge pull request #10397 from aj-gh/fixdoc-refreshonttlperc

Fix docs: refresh-on-ttl-perc was added in 4.5.0

4 years agoFix docs: refresh-on-ttl-perc was added in 4.5.0 10397/head
Andreas Jakum [Wed, 12 May 2021 13:52:07 +0000 (15:52 +0200)] 
Fix docs: refresh-on-ttl-perc was added in 4.5.0

4 years agoMerge pull request #10392 from Habbie/gpgsql-select-returning
Peter van Dijk [Wed, 12 May 2021 11:45:50 +0000 (13:45 +0200)] 
Merge pull request #10392 from Habbie/gpgsql-select-returning

auth gpgsql: use SELECT .. RETURNING to get inserted row ID

4 years agoMerge pull request #10394 from mnordhoff/rec-upgrade
Otto Moerbeek [Wed, 12 May 2021 10:48:29 +0000 (12:48 +0200)] 
Merge pull request #10394 from mnordhoff/rec-upgrade

Combine duplicate sections in Recursor upgrade guide

4 years agopdnsutil add-zone-key: better error formatting 10392/head
Peter van Dijk [Wed, 12 May 2021 10:26:55 +0000 (12:26 +0200)] 
pdnsutil add-zone-key: better error formatting

4 years agoauth gpgsql: use SELECT .. RETURNING to get inserted row ID, fixes #7175
Peter van Dijk [Wed, 12 May 2021 10:26:36 +0000 (12:26 +0200)] 
auth gpgsql: use SELECT .. RETURNING to get inserted row ID, fixes #7175

4 years agoCombine duplicate sections in Recursor upgrade guide. 10394/head
Matt Nordhoff [Wed, 12 May 2021 08:07:01 +0000 (08:07 +0000)] 
Combine duplicate sections in Recursor upgrade guide.

Also use more consistent capitalization and wording.

4 years agoMerge pull request #10389 from Habbie/dockerignore-git
Pieter Lexis [Tue, 11 May 2021 16:11:53 +0000 (18:11 +0200)] 
Merge pull request #10389 from Habbie/dockerignore-git

.dockerignore: do not ignore .git

4 years agoMerge pull request #10391 from omoerbeek/rec-fastopen-docs
Otto Moerbeek [Tue, 11 May 2021 13:25:08 +0000 (15:25 +0200)] 
Merge pull request #10391 from omoerbeek/rec-fastopen-docs

rec: Better wording for fastopen docs.

4 years agoMerge pull request #10350 from rgacogne/rec-duplicate-nsec-wc-proof
Remi Gacogne [Tue, 11 May 2021 12:54:48 +0000 (14:54 +0200)] 
Merge pull request #10350 from rgacogne/rec-duplicate-nsec-wc-proof

rec: Only add the NSEC and RRSIG records once in wildcard NODATA answers

4 years agoBetter wording for fastopen docs. 10391/head
Otto [Tue, 11 May 2021 12:18:58 +0000 (14:18 +0200)] 
Better wording for fastopen docs.

4 years agoMerge pull request #10388 from rgacogne/ddist-document-default-cache-cleaning-delay
Remi Gacogne [Tue, 11 May 2021 12:00:25 +0000 (14:00 +0200)] 
Merge pull request #10388 from rgacogne/ddist-document-default-cache-cleaning-delay

dnsdist: Document the default value of setCacheCleaningDelay()

4 years ago.dockerignore: do not ignore .git 10389/head
Peter van Dijk [Tue, 11 May 2021 10:27:33 +0000 (12:27 +0200)] 
.dockerignore: do not ignore .git

because we ignore **/*.1 to not drag built manpages into the docker
context - but this also prevents any tags ending in .1 (like rec-4.5.1)
from being built

4 years agodnsdist: Document the default value of setCacheCleaningDelay() 10388/head
Remi Gacogne [Tue, 11 May 2021 10:01:52 +0000 (12:01 +0200)] 
dnsdist: Document the default value of setCacheCleaningDelay()

4 years agoMerge pull request #10368 from omoerbeek/rec-prep-4.5.0
Otto Moerbeek [Tue, 11 May 2021 09:30:54 +0000 (11:30 +0200)] 
Merge pull request #10368 from omoerbeek/rec-prep-4.5.0

rec: Prep rec-4.5.1

4 years agoRebase after secpoll update 10368/head
Otto [Tue, 11 May 2021 08:07:00 +0000 (10:07 +0200)] 
Rebase after secpoll update

4 years agoIt's going to be 4.5.1
Otto [Mon, 10 May 2021 10:38:46 +0000 (12:38 +0200)] 
It's going to be 4.5.1

4 years agoUpdate pdns/recursordist/docs/appendices/EOL.rst
Otto Moerbeek [Fri, 7 May 2021 14:52:46 +0000 (16:52 +0200)] 
Update pdns/recursordist/docs/appendices/EOL.rst

Co-authored-by: Pieter Lexis <pieter@plexis.eu>
4 years agoPrep rec-4.5.0
Otto [Fri, 7 May 2021 07:32:04 +0000 (09:32 +0200)] 
Prep rec-4.5.0

4 years agoMerge pull request #10374 from rgacogne/ddist160-changelog
Remi Gacogne [Tue, 11 May 2021 08:00:36 +0000 (10:00 +0200)] 
Merge pull request #10374 from rgacogne/ddist160-changelog

dnsdist: Changelog and secpoll update for 1.6.0

4 years agodnsdist: Changelog and secpoll update for 1.6.0 10374/head
Remi Gacogne [Mon, 10 May 2021 08:18:53 +0000 (10:18 +0200)] 
dnsdist: Changelog and secpoll update for 1.6.0

4 years agoMerge pull request #10379 from rgacogne/ddist-fix-changelog
Remi Gacogne [Mon, 10 May 2021 12:12:08 +0000 (14:12 +0200)] 
Merge pull request #10379 from rgacogne/ddist-fix-changelog

dnsdist: Fix a typo in the ChangeLog header for 1.5.2

4 years agodnsdist: Fix a typo in the ChangeLog header for 1.5.2 10379/head
Remi Gacogne [Mon, 10 May 2021 12:08:20 +0000 (14:08 +0200)] 
dnsdist: Fix a typo in the ChangeLog header for 1.5.2

4 years agoMerge pull request #10163 from rgacogne/ddist152-changelog
Remi Gacogne [Mon, 10 May 2021 11:53:34 +0000 (13:53 +0200)] 
Merge pull request #10163 from rgacogne/ddist152-changelog

dnsdist: Update ChangeLog and secpoll zone for 1.5.2

4 years agoMerge pull request #10375 from rgacogne/rec-aggressive-nsec-salt-race
Otto Moerbeek [Mon, 10 May 2021 10:24:53 +0000 (12:24 +0200)] 
Merge pull request #10375 from rgacogne/rec-aggressive-nsec-salt-race

rec: Prevent a race in the aggressive NSEC cache

4 years agoMerge pull request #10364 from rgacogne/auth-fromiscmap-b64
Peter van Dijk [Mon, 10 May 2021 07:44:35 +0000 (09:44 +0200)] 
Merge pull request #10364 from rgacogne/auth-fromiscmap-b64

auth: Don't choke on non-base64 values when importing zone keys

4 years agorec: Prevent a race in the aggressive NSEC cache 10375/head
Remi Gacogne [Fri, 7 May 2021 15:25:01 +0000 (17:25 +0200)] 
rec: Prevent a race in the aggressive NSEC cache

When a new NSEC3 record has a different salt than the one we know, we
update the zone entry with the new salt. Unfortunately, that salt was
read without holding the lock in `AggressiveNSECCache::getNSEC3Denial`,
leading to a possible data race.

4 years agoMerge pull request #10370 from yantarou/ixfrdist_typo dnsdist-1.6.0
Peter van Dijk [Sat, 8 May 2021 20:01:58 +0000 (22:01 +0200)] 
Merge pull request #10370 from yantarou/ixfrdist_typo

docs: fix typo in ixfrdist docs

4 years agoMerge pull request #10371 from mnordhoff/dnsdist-docs-tcaction
Pieter Lexis [Fri, 7 May 2021 12:34:02 +0000 (14:34 +0200)] 
Merge pull request #10371 from mnordhoff/dnsdist-docs-tcaction

dnsdist docs: switch RA and RD

4 years agodnsdist docs: switch RA and RD 10371/head
Matt Nordhoff [Fri, 7 May 2021 10:55:31 +0000 (10:55 +0000)] 
dnsdist docs: switch RA and RD

4 years agodocs: fix typo in ixfrdist docs 10370/head
Jan Hilberath [Fri, 7 May 2021 10:07:46 +0000 (19:07 +0900)] 
docs: fix typo in ixfrdist docs

4 years agodnsdist: May the 10th seems more realistic for the 1.5.2 release 10163/head
Remi Gacogne [Fri, 7 May 2021 07:55:03 +0000 (09:55 +0200)] 
dnsdist: May the 10th seems more realistic for the 1.5.2 release

4 years agoMerge pull request #10353 from rgacogne/rec-dns64-on-rpz-hit-after-gettag-ffi-hit
Otto Moerbeek [Thu, 6 May 2021 18:18:22 +0000 (20:18 +0200)] 
Merge pull request #10353 from rgacogne/rec-dns64-on-rpz-hit-after-gettag-ffi-hit

rec: Apply dns64 on RPZ hits generated after a gettag_ffi hit

4 years agoMerge pull request #10292 from omoerbeek/rec-more-tsan
Otto Moerbeek [Thu, 6 May 2021 18:17:24 +0000 (20:17 +0200)] 
Merge pull request #10292 from omoerbeek/rec-more-tsan

rec: Fix TSAN complaints: max stacksize and response stats size counters

4 years agoMerge pull request #10361 from dmachard/auth-timeout-luarecords
Peter van Dijk [Thu, 6 May 2021 13:51:23 +0000 (15:51 +0200)] 
Merge pull request #10361 from dmachard/auth-timeout-luarecords

auth: change default timeout to 2s for lua records

4 years agoFix typo in DNSCryptoKeyEngine::makeFromISCString 10364/head
Remi Gacogne [Thu, 6 May 2021 13:00:18 +0000 (15:00 +0200)] 
Fix typo in DNSCryptoKeyEngine::makeFromISCString

Co-authored-by: Peter van Dijk <peter.van.dijk@powerdns.com>
4 years agoauth: Don't choke on non-base64 values when importing zone keys
Remi Gacogne [Thu, 6 May 2021 10:12:43 +0000 (12:12 +0200)] 
auth: Don't choke on non-base64 values when importing zone keys

DNSCryptoKeyEngine::makeFromISCFile(), called by `pdnsutil import-zone-key`
or the API, for example, would try to parse almost all values as a
base64 string. Depending on the version of OpenSSL, it could have lead
to a weird `Error: BIO_read failed to read all data from memory buffer`
error when the file contains a non-base64 value, like for example:
```
Flags: 257
```
Recent versions of OpenSSL seems to simply return that the value could
not be parsed, but older ones (OpenSSL 1.0.2k from CentOS 7 for example)
would report an incomplete read (BIO_should_retry() returning 1),
triggering an exception that prevents the key from being loaded.
This commits keeps a longer list of known non-base64 values, but
more importantly catch the base64 decoding exception and then store the
initial value instead of aborting. Only failure to decode known base64
values prevents the key from being loaded.

4 years agoMerge pull request #10362 from Habbie/dnsdist-docs-tcaction
Remi Gacogne [Thu, 6 May 2021 08:10:12 +0000 (10:10 +0200)] 
Merge pull request #10362 from Habbie/dnsdist-docs-tcaction

dnsdist docs: correct bits for TCAction

4 years agodnsdist docs: correct bits for TCAction 10362/head
Peter van Dijk [Thu, 6 May 2021 04:13:22 +0000 (06:13 +0200)] 
dnsdist docs: correct bits for TCAction

4 years agochange default timeout to 2s for lua records 10361/head
dmachard [Wed, 5 May 2021 16:51:50 +0000 (18:51 +0200)] 
change default timeout to 2s for lua records

4 years agorec: Test the most simple condition first 10353/head
Remi Gacogne [Tue, 4 May 2021 16:30:47 +0000 (18:30 +0200)] 
rec: Test the most simple condition first

Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
4 years agodnsdist: Update ChangeLog and secpoll zone for 1.5.2
Remi Gacogne [Tue, 4 May 2021 16:24:21 +0000 (18:24 +0200)] 
dnsdist: Update ChangeLog and secpoll zone for 1.5.2

4 years agorec: Add a regression test for gettag_ffi, RPZ and DNS64 interaction
Remi Gacogne [Tue, 4 May 2021 12:56:40 +0000 (14:56 +0200)] 
rec: Add a regression test for gettag_ffi, RPZ and DNS64 interaction

4 years agorec: Apply dns64 on RPZ hits generated after a gettag_ffi hit
Remi Gacogne [Tue, 4 May 2021 10:29:32 +0000 (12:29 +0200)] 
rec: Apply dns64 on RPZ hits generated after a gettag_ffi hit

We do special case the qname RPZ processing after a gettag_ffi hit,
leading to dns64 to not be applied in that case. This commit adds
dns64 handling to the special case.

4 years agoMerge pull request #10347 from rgacogne/ddist-16rc2-changelog
Remi Gacogne [Tue, 4 May 2021 08:15:02 +0000 (10:15 +0200)] 
Merge pull request #10347 from rgacogne/ddist-16rc2-changelog

dnsdist: Add ChangeLog and secpoll for 1.6.0-rc2

4 years agoMerge pull request #10346 from rgacogne/ddist-dnscrypt-locks dnsdist-1.6.0-rc2
Remi Gacogne [Mon, 3 May 2021 14:37:12 +0000 (16:37 +0200)] 
Merge pull request #10346 from rgacogne/ddist-dnscrypt-locks

dnsdist: Fix missing locks in DNSCrypt certificates management

4 years agorec: Only add the NSEC and RRSIG records once in wildcard NODATA answers 10350/head
Remi Gacogne [Mon, 3 May 2021 13:00:04 +0000 (15:00 +0200)] 
rec: Only add the NSEC and RRSIG records once in wildcard NODATA answers

For wildcard-expanded answers we need to collect the proof that the
exact name does not exist and add them to the response. We also
collect that proof for negative answers.
When the answer is a wildcard-expanded NODATA, we only need to collect
them once, not twice.

4 years agodnsdist: Add ChangeLog and secpoll for 1.6.0-rc2 10347/head
Remi Gacogne [Mon, 3 May 2021 09:23:46 +0000 (11:23 +0200)] 
dnsdist: Add ChangeLog and secpoll for 1.6.0-rc2

4 years agodnsdist: Fix missing locks in DNSCrypt certificates management 10346/head
Remi Gacogne [Mon, 3 May 2021 08:22:08 +0000 (10:22 +0200)] 
dnsdist: Fix missing locks in DNSCrypt certificates management

In theory these functions should already be protected by the Lua
lock but better safe than sorry.
Found while working on the migration to LockGuarded.

4 years agoMerge pull request #10293 from Habbie/update-builder
Pieter Lexis [Mon, 3 May 2021 07:51:21 +0000 (09:51 +0200)] 
Merge pull request #10293 from Habbie/update-builder

update builder - i accidentally downgraded it in 4f57dec4a7f1b94c6da4c0d3fdfecf73781bbcb2

4 years agoMerge pull request #10327 from rgacogne/ddist-dynblocks-ebpf
Remi Gacogne [Mon, 3 May 2021 07:48:58 +0000 (09:48 +0200)] 
Merge pull request #10327 from rgacogne/ddist-dynblocks-ebpf

dnsdist: Only use eBPF for "drop" actions, clean up more often

4 years agoMerge pull request #10344 from omoerbeek/boostm4-clang11.1
Otto Moerbeek [Fri, 30 Apr 2021 15:23:37 +0000 (17:23 +0200)] 
Merge pull request #10344 from omoerbeek/boostm4-clang11.1

auto.m4: clang 11.1 is a thing

4 years agoMerge pull request #10343 from omoerbeek/dnsdist-test-warnings
Otto Moerbeek [Fri, 30 Apr 2021 15:19:23 +0000 (17:19 +0200)] 
Merge pull request #10343 from omoerbeek/dnsdist-test-warnings

dnsdist: fix test warnings

4 years agoFix a few signed vs unsigned warnings as seen on OpenBSD 10343/head
Otto [Fri, 30 Apr 2021 13:58:26 +0000 (15:58 +0200)] 
Fix a few signed vs unsigned warnings as seen on OpenBSD

4 years agoclang 11.1 is a thing 10344/head
Otto [Fri, 30 Apr 2021 13:45:44 +0000 (15:45 +0200)] 
clang 11.1 is a thing

4 years agoMerge pull request #10336 from rgacogne/cpp17-string-view
Remi Gacogne [Fri, 30 Apr 2021 10:42:26 +0000 (12:42 +0200)] 
Merge pull request #10336 from rgacogne/cpp17-string-view

Get rid of our string_view selection process, C++17 has all we need

4 years agoMerge pull request #10339 from phonedph1/patch-28
Pieter Lexis [Fri, 30 Apr 2021 10:32:05 +0000 (12:32 +0200)] 
Merge pull request #10339 from phonedph1/patch-28

rec: Update hooks.rst

4 years agoRemove the now empty views.hh header 10336/head
Remi Gacogne [Thu, 29 Apr 2021 16:39:12 +0000 (18:39 +0200)] 
Remove the now empty views.hh header

4 years agoUpdate hooks.rst 10339/head
phonedph1 [Thu, 29 Apr 2021 02:17:56 +0000 (20:17 -0600)] 
Update hooks.rst

4 years agoMerge pull request #10337 from omoerbeek/rec-prep-4.5.0-rc1
Otto Moerbeek [Wed, 28 Apr 2021 09:39:15 +0000 (11:39 +0200)] 
Merge pull request #10337 from omoerbeek/rec-prep-4.5.0-rc1

rec: Prep for rec-4.5.0-rc1

4 years agoMerge pull request #10259 from Habbie/spgsql-drop-refcursor-support
Peter van Dijk [Mon, 26 Apr 2021 14:15:06 +0000 (16:15 +0200)] 
Merge pull request #10259 from Habbie/spgsql-drop-refcursor-support

auth gpgsql: add stored procedure test, drop refcursor support

4 years agoPrep for rec-4.5.0-rc1 10337/head
Otto [Mon, 26 Apr 2021 09:35:36 +0000 (11:35 +0200)] 
Prep for rec-4.5.0-rc1

4 years agoMerge pull request #10329 from Habbie/boost-container-exceptions
Otto Moerbeek [Mon, 26 Apr 2021 09:13:37 +0000 (11:13 +0200)] 
Merge pull request #10329 from Habbie/boost-container-exceptions

boost 1.76 containers: use standard exceptions

4 years agoGet rid of our string_view selection process, C++17 has all we need
Remi Gacogne [Mon, 26 Apr 2021 08:14:07 +0000 (10:14 +0200)] 
Get rid of our string_view selection process, C++17 has all we need

4 years agoboost 1.76 containers: use standard exceptions 10329/head
Peter van Dijk [Fri, 23 Apr 2021 13:40:43 +0000 (15:40 +0200)] 
boost 1.76 containers: use standard exceptions

4 years agodnsdist: Only use eBPF for "drop" actions 10327/head
Remi Gacogne [Thu, 22 Apr 2021 08:38:43 +0000 (10:38 +0200)] 
dnsdist: Only use eBPF for "drop" actions

4 years agodnsdist: Document that eBPF is only used for "drop" actions
Remi Gacogne [Thu, 22 Apr 2021 08:15:54 +0000 (10:15 +0200)] 
dnsdist: Document that eBPF is only used for "drop" actions

4 years agodnsdist: Set setDynBlocksPurgeInterval()'s default to 60s
Remi Gacogne [Thu, 22 Apr 2021 08:13:32 +0000 (10:13 +0200)] 
dnsdist: Set setDynBlocksPurgeInterval()'s default to 60s

4 years agoMerge pull request #10323 from rgacogne/ddist-tsan-snmp
Remi Gacogne [Thu, 22 Apr 2021 08:06:38 +0000 (10:06 +0200)] 
Merge pull request #10323 from rgacogne/ddist-tsan-snmp

dnsdist: Make the backend queryLoad and dropRate values atomic

4 years agoMerge pull request #10310 from rgacogne/fix-simple-match
Remi Gacogne [Wed, 21 Apr 2021 13:17:22 +0000 (15:17 +0200)] 
Merge pull request #10310 from rgacogne/fix-simple-match

auth: Prevent dereferencing std::string::end() in SimpleMatch

4 years agodnsdist: Make the backend queryLoad and dropRate values atomic 10323/head
Remi Gacogne [Wed, 21 Apr 2021 12:20:52 +0000 (14:20 +0200)] 
dnsdist: Make the backend queryLoad and dropRate values atomic

So that there is no race when these vaues are read by the SNMP or
web threads and updated by the health check thread at the same time.
Reported by Thread Sanitizer:

WARNING: ThreadSanitizer: data race (pid=11167)
  Write of size 8 at 0x7b7400002558 by thread T18:
    #0 healthChecksThread() /opt/project/pdns/dnsdistdist/dnsdist.cc:1712:22 (dnsdist+0xf2a4a2)
    #1 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:60:14 (dnsdist+0xf40ea2)
    #2 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:95:14 (dnsdist+0xf40e0d)
    #3 decltype(std::__invoke(_S_declval<0ul>())) std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:244:13 (dnsdist+0xf40dd5)
    #4 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:253:11 (dnsdist+0xf40d95)
    #5 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:196:13 (dnsdist+0xf40c29)
    #6 <null> <null> (libstdc++.so.6+0xbbb2e)

  Previous read of size 8 at 0x7b7400002558 by thread T2:
    #0 backendStatTable_handler(netsnmp_mib_handler_s*, netsnmp_handler_registration_s*, netsnmp_agent_request_info_s*, netsnmp_request_info_s*) /opt/project/pdns/dnsdistdist/dnsdist-snmp.cc:356:62 (dnsdist+0xeccf98)
    #1 netsnmp_call_next_handler <null> (libnetsnmpagent.so.30+0x2a0cc)
    #2 SNMPAgent::handleSNMPQueryCB(int, boost::any&) /opt/project/pdns/dnsdistdist/snmp-agent.cc:96:13 (dnsdist+0xfb0847)
    #3 boost::detail::function::void_function_invoker2<void (*)(int, boost::any&), void, int, boost::any&>::invoke(boost::detail::function::function_buffer&, int, boost::any&) /usr/include/boost/function/function_template.hpp:118:11 (dnsdist+0x8937d8)
    #4 boost::function2<void, int, boost::any&>::operator()(int, boost::any&) const /usr/include/boost/function/function_template.hpp:768:14 (dnsdist+0xf9d56c)
    #5 EpollFDMultiplexer::run(timeval*, int) /opt/project/pdns/dnsdistdist/epollmplexer.cc:176:7 (dnsdist+0xfd041b)
    #6 SNMPAgent::worker() /opt/project/pdns/dnsdistdist/snmp-agent.cc:141:24 (dnsdist+0xfb0b6f)
    #7 void std::__invoke_impl<void, void (SNMPAgent::*)(), SNMPAgent*>(std::__invoke_memfun_deref, void (SNMPAgent::*&&)(), SNMPAgent*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:73:14 (dnsdist+0xf344c9)
    #8 std::__invoke_result<void (SNMPAgent::*)(), SNMPAgent*>::type std::__invoke<void (SNMPAgent::*)(), SNMPAgent*>(void (SNMPAgent::*&&)(), SNMPAgent*&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:95:14 (dnsdist+0xf343c1)
    #9 decltype(std::__invoke(_S_declval<0ul>(), _S_declval<1ul>())) std::thread::_Invoker<std::tuple<void (SNMPAgent::*)(), SNMPAgent*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:244:13 (dnsdist+0xf3436e)
    #10 std::thread::_Invoker<std::tuple<void (SNMPAgent::*)(), SNMPAgent*> >::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:253:11 (dnsdist+0xf34315)
    #11 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (SNMPAgent::*)(), SNMPAgent*> > >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/thread:196:13 (dnsdist+0xf34079)
    #12 <null> <null> (libstdc++.so.6+0xbbb2e)

4 years agoMerge pull request #10312 from omoerbeek/rec-pc-sizing
Otto Moerbeek [Wed, 21 Apr 2021 10:31:47 +0000 (12:31 +0200)] 
Merge pull request #10312 from omoerbeek/rec-pc-sizing

rec: Improve packet cache sizing.

4 years agotypo 10312/head
Otto Moerbeek [Wed, 21 Apr 2021 09:01:56 +0000 (11:01 +0200)] 
typo

Co-authored-by: Remi Gacogne <github@coredump.fr>
4 years agoMerge pull request #10311 from rgacogne/ddist-newserver-sockets-doc
Remi Gacogne [Wed, 21 Apr 2021 08:24:32 +0000 (10:24 +0200)] 
Merge pull request #10311 from rgacogne/ddist-newserver-sockets-doc

dnsdist: Better documentation of newServer's 'sockets' parameter

4 years agoMerge pull request #10322 from rubenk/typos
Otto Moerbeek [Tue, 20 Apr 2021 18:52:24 +0000 (20:52 +0200)] 
Merge pull request #10322 from rubenk/typos

Fix two typos in lua scripting docs

4 years agoFix two typos in lua scripting docs 10322/head
Ruben Kerkhof [Tue, 20 Apr 2021 17:39:07 +0000 (19:39 +0200)] 
Fix two typos in lua scripting docs

4 years agoMerge pull request #10318 from mnordhoff/toclients
Otto Moerbeek [Tue, 20 Apr 2021 14:58:44 +0000 (16:58 +0200)] 
Merge pull request #10318 from mnordhoff/toclients

rec: Fix typo in edns-padding-tag help

4 years agorec: Fix typo in edns-padding-tag help 10318/head
Matt Nordhoff [Tue, 20 Apr 2021 13:41:42 +0000 (13:41 +0000)] 
rec: Fix typo in edns-padding-tag help