]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
2 years agodnsdist: Use EDNSOptionViewMap in more places 12354/head
Remi Gacogne [Mon, 9 Jan 2023 10:24:42 +0000 (11:24 +0100)] 
dnsdist: Use EDNSOptionViewMap in more places

As suggested by Otto.

2 years agodnsdist: Move DNSQuestion's EDNS options to a unique pointer
Remi Gacogne [Thu, 15 Dec 2022 09:24:39 +0000 (10:24 +0100)] 
dnsdist: Move DNSQuestion's EDNS options to a unique pointer

2 years agodnsdist: Store the maximum UDP payload size in the internal state 12329/head
Remi Gacogne [Wed, 14 Dec 2022 16:41:29 +0000 (17:41 +0100)] 
dnsdist: Store the maximum UDP payload size in the internal state

2 years agodnsdist: Store the initial query time in the internal state as well
Remi Gacogne [Wed, 14 Dec 2022 16:29:27 +0000 (17:29 +0100)] 
dnsdist: Store the initial query time in the internal state as well

That way it is available in the response.

2 years agodnsdist: Turn DNSQuestion and DNSResponse into IDState overlays
Remi Gacogne [Fri, 25 Nov 2022 16:38:07 +0000 (17:38 +0100)] 
dnsdist: Turn DNSQuestion and DNSResponse into IDState overlays

Remaining:

queryRealTime
udpPayloadSize

2 years agodnsdist: Clean up unused fieds from the IDState
Remi Gacogne [Thu, 24 Nov 2022 16:22:37 +0000 (17:22 +0100)] 
dnsdist: Clean up unused fieds from the IDState

2 years agodnsdist: Refactor the handling of responses for UDP clients
Remi Gacogne [Thu, 24 Nov 2022 16:21:48 +0000 (17:21 +0100)] 
dnsdist: Refactor the handling of responses for UDP clients

2 years agodnsdist: Add dnsdist::Protocol::isUDP()
Remi Gacogne [Thu, 24 Nov 2022 16:20:27 +0000 (17:20 +0100)] 
dnsdist: Add dnsdist::Protocol::isUDP()

2 years agoMerge pull request #12319 from omoerbeek/dnsdist-rlim_t
Otto Moerbeek [Tue, 13 Dec 2022 11:25:59 +0000 (12:25 +0100)] 
Merge pull request #12319 from omoerbeek/dnsdist-rlim_t

dnsdist: Use rlim_t for limit

2 years agoUse rlim_t for limit 12319/head
Otto Moerbeek [Tue, 13 Dec 2022 10:14:08 +0000 (11:14 +0100)] 
Use rlim_t for limit

2 years agoMerge pull request #12318 from omoerbeek/rec-reorg
Otto Moerbeek [Tue, 13 Dec 2022 10:12:11 +0000 (11:12 +0100)] 
Merge pull request #12318 from omoerbeek/rec-reorg

Rec reorg: move recursor specific files to recursordist

2 years agoStep 3: reformat moved files previously not formatted 12318/head
Otto Moerbeek [Tue, 13 Dec 2022 08:30:46 +0000 (09:30 +0100)] 
Step 3: reformat moved files previously not formatted

2 years agoStep 2: mv rec specific files to recursordist
Otto Moerbeek [Tue, 13 Dec 2022 08:22:42 +0000 (09:22 +0100)] 
Step 2: mv rec specific files to recursordist

2 years agoStep one: remove symlinks to rec-specific files
Otto Moerbeek [Tue, 13 Dec 2022 08:21:40 +0000 (09:21 +0100)] 
Step one: remove symlinks to rec-specific files

2 years agoMerge pull request #12193 from omoerbeek/rec-tcounters
Otto Moerbeek [Tue, 13 Dec 2022 06:36:12 +0000 (07:36 +0100)] 
Merge pull request #12193 from omoerbeek/rec-tcounters

Introducing TCounters

2 years agoMerge pull request #12317 from omoerbeek/rec-fix-freebsd
Otto Moerbeek [Tue, 13 Dec 2022 06:29:32 +0000 (07:29 +0100)] 
Merge pull request #12317 from omoerbeek/rec-fix-freebsd

rec: Fix compilation on FreeBSD

2 years agoFix compilation on FreeBSD. reported by HellSpawn 12317/head
Otto Moerbeek [Mon, 12 Dec 2022 19:03:04 +0000 (20:03 +0100)] 
Fix compilation on FreeBSD. reported by HellSpawn

2 years agoTwo Bucket fields can be const if we take care in the asssignment op. 12193/head
Otto Moerbeek [Mon, 12 Dec 2022 18:59:40 +0000 (19:59 +0100)] 
Two Bucket fields can be const if we take care in the asssignment op.

2 years agoTypo in comment
Otto Moerbeek [Mon, 12 Dec 2022 17:10:33 +0000 (18:10 +0100)] 
Typo in comment

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agoApply suggestions from code review
Otto Moerbeek [Mon, 12 Dec 2022 17:09:48 +0000 (18:09 +0100)] 
Apply suggestions from code review

Co-authored-by: Remi Gacogne <github@coredump.fr>
2 years agoMerge pull request #12316 from rgacogne/ddist-disable-tsan-send-wrappers
Remi Gacogne [Mon, 12 Dec 2022 15:26:11 +0000 (16:26 +0100)] 
Merge pull request #12316 from rgacogne/ddist-disable-tsan-send-wrappers

dnsdist: Disable the send wrappers in our CI

2 years agodnsdist: Disable the send wrappers in our CI 12316/head
Remi Gacogne [Mon, 12 Dec 2022 14:42:57 +0000 (15:42 +0100)] 
dnsdist: Disable the send wrappers in our CI

The way the send wrappers are implemented, reading the data _after_
it has been sent, cause them to report a data race that does not
exist with existing implementations:
- we call `send()` from thread 1 to send a query to a backend, never
  touching the data or associated metadata again from that thread
- we get a response from the backend in a different thread, thread 2,
  which will then access the metadata and sometimes (truncated UDP
  answers following a DoH query) even modify the data itself
- ASAN and TSAN complain because the wrapper might still be reading
  the data after the UDP datagram has been sent, which is effectively
  a race, but it does not really make any sense for an actual
  implementation of `send()` to do that.

We work around that by disabling the `send()` wrappers in our CI,
for the dnsdist regression tests only, via `intercept_send=0`.

2 years agoMerge pull request #12308 from omoerbeek/rec-prep-4.8.0
Otto Moerbeek [Mon, 12 Dec 2022 12:39:38 +0000 (13:39 +0100)] 
Merge pull request #12308 from omoerbeek/rec-prep-4.8.0

Prep for rec-4.8.0 final release

2 years agoApply suggestions from code review
Otto Moerbeek [Mon, 12 Dec 2022 11:52:34 +0000 (12:52 +0100)] 
Apply suggestions from code review

Co-authored-by: Peter van Dijk <peter.van.dijk@powerdns.com>
2 years agoClose a race: some test immediately query metrics when a query result is received.
Otto Moerbeek [Tue, 6 Dec 2022 10:18:56 +0000 (11:18 +0100)] 
Close a race: some test immediately query metrics when a query result is received.
to avoid ordering issues, update metrics snap before answers are sent out.

2 years agoSince we now register stats in the main startup code, no need to do
Otto Moerbeek [Tue, 6 Dec 2022 09:09:41 +0000 (10:09 +0100)] 
Since we now register stats in the main startup code, no need to do
it per-thread

2 years agoIntroducing TCounters
Otto Moerbeek [Tue, 8 Nov 2022 10:10:54 +0000 (11:10 +0100)] 
Introducing TCounters

This is a mostly lockless (and not using atomics) way to keep track of
counters and other metrics.

Atomic value are more expensive than you would think (especially if
your platform has no native atomic support for your data type), and
using locking all the time for often updated counters is very
expensive as well.

The idea for `TCounters` is based on

https://github.com/ahupowerdns/mcounter

But addresses the issues raised in
https://github.com/ahupowerdns/mcounter/issues/3

Templates are used, the application has to provide a specific class to
hold the values and enums to index these values.  The application
specific class also has to provide a `merge()` method to merge two
instances of the application specific data.  For counters that is
simple: just add them. Averages (or histogrfam) requires a bit more
work. This is demonstrated in `rec-tcounters.{cc,hh}`

At the end of a body of work the application's threads should call the
`updateSnap()` function. If a certain amount of time has passed since
the last time, a thread local snapshot of the thread local data will
be created in a thread-safe way.

The class that collects the aggregated values reads (also in a thread
safe way) from the snapshot values in each thread.

Updates of individual counters are done on thread-local data,
potentially many times per second. The snaps contain a consistent set
of the values and are taken by default once per 100ms, so reletively
seldom.

By using the snap mnechanism the aggragate values computed are based
on internally consistent counter values (as long as related counters
are updated from the same thread). A (small) drawback is that the
values computed might be a bit out of date.

The snapshot approach was suggested by @wojas.

This PR de demonstrates `TCounters` for a few Recursor metrics: simple
counters and double typed average values. For the latter weights are
kept, so that the average of averages can be computed in a proper way.

2 years agoMention dnstapNODFrameStreamServer 12308/head
Otto Moerbeek [Mon, 12 Dec 2022 08:18:29 +0000 (09:18 +0100)] 
Mention dnstapNODFrameStreamServer

2 years agoMerge pull request #12315 from rgacogne/spell-check-fixes
Remi Gacogne [Mon, 12 Dec 2022 09:16:39 +0000 (10:16 +0100)] 
Merge pull request #12315 from rgacogne/spell-check-fixes

spell-check: Make the spell-checker happy

2 years agospell-check: Make the spell-checker happy 12315/head
Remi Gacogne [Mon, 12 Dec 2022 09:11:43 +0000 (10:11 +0100)] 
spell-check: Make the spell-checker happy

2 years agoMerge pull request #12311 from omoerbeek/dnsdist-docs-top
Remi Gacogne [Fri, 9 Dec 2022 15:30:43 +0000 (16:30 +0100)] 
Merge pull request #12311 from omoerbeek/dnsdist-docs-top

dnsdist: List default of top argument of topX functions

2 years agoList default of top argument of topX functions 12311/head
Otto Moerbeek [Fri, 9 Dec 2022 15:26:09 +0000 (16:26 +0100)] 
List default of top argument of topX functions

2 years agoMerge pull request #12280 from rgacogne/ddist-cache-inserted-rules
Remi Gacogne [Fri, 9 Dec 2022 14:43:33 +0000 (15:43 +0100)] 
Merge pull request #12280 from rgacogne/ddist-cache-inserted-rules

dnsdist: Add a new chain of rules triggered after cache insertion

2 years agoMerge pull request #12307 from omoerbeek/update-builder
Otto Moerbeek [Fri, 9 Dec 2022 11:03:59 +0000 (12:03 +0100)] 
Merge pull request #12307 from omoerbeek/update-builder

Update builder to work better on MacOS

2 years agoUpgrade guide additions for 4.8.0
Otto Moerbeek [Fri, 9 Dec 2022 10:57:28 +0000 (11:57 +0100)] 
Upgrade guide additions for 4.8.0

2 years agoPrep for rec-4.8.0 final release
Otto Moerbeek [Thu, 8 Dec 2022 10:02:20 +0000 (11:02 +0100)] 
Prep for rec-4.8.0 final release

2 years agoMerge pull request #12305 from Habbie/auth-docs-4.5.5-4.6.4-4.7.3
Peter van Dijk [Fri, 9 Dec 2022 10:09:57 +0000 (11:09 +0100)] 
Merge pull request #12305 from Habbie/auth-docs-4.5.5-4.6.4-4.7.3

auth 4.5..5 / 4.6.4 / 4.7.3: changelog & secpoll

2 years agoMerge pull request #12306 from rgacogne/ddist-docs-checkclass-typo
Remi Gacogne [Fri, 9 Dec 2022 09:19:17 +0000 (10:19 +0100)] 
Merge pull request #12306 from rgacogne/ddist-docs-checkclass-typo

dnsdist: Fix a typo in the Healthcheck configuration guide

2 years agoUpdate builder to work better on MacOS 12307/head
Otto Moerbeek [Fri, 9 Dec 2022 09:10:59 +0000 (10:10 +0100)] 
Update builder to work better on MacOS

2 years agodnsdist: Fix a typo in the Healthcheck configuration guide 12306/head
Remi Gacogne [Fri, 9 Dec 2022 08:47:27 +0000 (09:47 +0100)] 
dnsdist: Fix a typo in the Healthcheck configuration guide

As reported by Kai Stian Olstad (thanks!).

2 years agoMerge pull request #12297 from chbruyand/auth-ifurlup-byteslimit
Peter van Dijk [Fri, 9 Dec 2022 08:33:06 +0000 (09:33 +0100)] 
Merge pull request #12297 from chbruyand/auth-ifurlup-byteslimit

minicurl: fix missing CURLOPT_XFERINFOFUNCTION on old curl versions

2 years agoauth 4.5..5 / 4.6.4 / 4.7.3: changelog & secpoll 12305/head
Peter van Dijk [Fri, 9 Dec 2022 08:27:42 +0000 (09:27 +0100)] 
auth 4.5..5 / 4.6.4 / 4.7.3: changelog & secpoll

2 years agoMerge pull request #12302 from omoerbeek/dnsdist-docs-implicit
Otto Moerbeek [Thu, 8 Dec 2022 14:25:35 +0000 (15:25 +0100)] 
Merge pull request #12302 from omoerbeek/dnsdist-docs-implicit

dnsdist: Document what happens to a packet not handled by any action

2 years agodnsdist: Document what happens to a packet not handled by any action 12302/head
Otto Moerbeek [Thu, 8 Dec 2022 13:45:29 +0000 (14:45 +0100)] 
dnsdist: Document what happens to a packet not handled by any action

2 years agoMerge pull request #12301 from omoerbeek/rec-docs-preoutquery
Otto Moerbeek [Thu, 8 Dec 2022 12:59:41 +0000 (13:59 +0100)] 
Merge pull request #12301 from omoerbeek/rec-docs-preoutquery

rec: Document preoutquery limitations

2 years agorec: Document preoutquery limitations 12301/head
Otto Moerbeek [Thu, 8 Dec 2022 12:14:03 +0000 (13:14 +0100)] 
rec: Document preoutquery limitations

Fixes #10247

2 years agominicurl: fix missing CURLOPT_XFERINFOFUNCTION on old curl versions 12297/head
Charles-Henri Bruyand [Wed, 7 Dec 2022 14:26:15 +0000 (15:26 +0100)] 
minicurl: fix missing CURLOPT_XFERINFOFUNCTION on old curl versions

2 years agoMerge pull request #12203 from sspans/patch-3
Otto Moerbeek [Thu, 8 Dec 2022 09:42:38 +0000 (10:42 +0100)] 
Merge pull request #12203 from sspans/patch-3

rec: Allow both A and AAAA when importing /etc/hosts

2 years agoMerge pull request #12282 from Habbie/lmdb-notify
Peter van Dijk [Thu, 8 Dec 2022 09:12:20 +0000 (10:12 +0100)] 
Merge pull request #12282 from Habbie/lmdb-notify

auth lmdb: make outgoing notifications work

2 years agoMerge pull request #11554 from yog-singh/yog-singh/ddist-ebpf-memlock-limit
Otto Moerbeek [Thu, 8 Dec 2022 08:55:34 +0000 (09:55 +0100)] 
Merge pull request #11554 from yog-singh/yog-singh/ddist-ebpf-memlock-limit

dnsdist: Raise RLIMIT_MEMLOCK automatically when eBPF is requested

2 years agoTake searchsuffix into acount when generating targets of PTR records. 12203/head
Otto Moerbeek [Wed, 7 Dec 2022 09:51:04 +0000 (10:51 +0100)] 
Take searchsuffix into acount when generating targets of PTR records.

Fix tests for that and also add a testcode for boths v4 and v6 localhost

2 years agoAvoid too many lookups by using iterator
Otto Moerbeek [Wed, 30 Nov 2022 09:45:33 +0000 (10:45 +0100)] 
Avoid too many lookups by using iterator

2 years agoAllow multiple records with same name for etc/hosts processing
Sten Spans [Wed, 16 Nov 2022 21:46:21 +0000 (22:46 +0100)] 
Allow multiple records with same name for etc/hosts processing

This seems to do something right at least

2 years agodnsdist: Add a few missing bindings and docs for the cache-inserted rules 12280/head
Remi Gacogne [Thu, 8 Dec 2022 08:43:42 +0000 (09:43 +0100)] 
dnsdist: Add a few missing bindings and docs for the cache-inserted rules

2 years agoMerge pull request #12281 from rgacogne/ddist-optim-cross
Remi Gacogne [Thu, 8 Dec 2022 08:33:10 +0000 (09:33 +0100)] 
Merge pull request #12281 from rgacogne/ddist-optim-cross

dnsdist: Get rid of TCPCrossProtocolQuerySender

2 years agolmdb tests: actually use lmdb config 12282/head
Peter van Dijk [Tue, 6 Dec 2022 17:56:58 +0000 (18:56 +0100)] 
lmdb tests: actually use lmdb config

2 years agoauth lmdb: make outgoing notifications work
Peter van Dijk [Tue, 6 Dec 2022 16:42:27 +0000 (17:42 +0100)] 
auth lmdb: make outgoing notifications work

2 years agoMerge pull request #12298 from Habbie/tinydns-data-fix2
Peter van Dijk [Wed, 7 Dec 2022 18:34:31 +0000 (19:34 +0100)] 
Merge pull request #12298 from Habbie/tinydns-data-fix2

actually fix tinydns data

2 years agoMerge pull request #12274 from rgacogne/ddist-debug-snmp
Remi Gacogne [Wed, 7 Dec 2022 15:37:55 +0000 (16:37 +0100)] 
Merge pull request #12274 from rgacogne/ddist-debug-snmp

dnsdist: Add logs to investigate the SNMP regression tests failure

2 years agoactually fix tinydns data 12298/head
Peter van Dijk [Wed, 7 Dec 2022 15:00:02 +0000 (16:00 +0100)] 
actually fix tinydns data

2 years agoMerge pull request #12290 from omoerbeek/mincurl-coverity
Otto Moerbeek [Wed, 7 Dec 2022 14:31:52 +0000 (15:31 +0100)] 
Merge pull request #12290 from omoerbeek/mincurl-coverity

Coverity 1501408: Uninitialized scalar field

2 years agoMerge pull request #12289 from omoerbeek/rec-unsupported-qtype
Otto Moerbeek [Wed, 7 Dec 2022 13:33:56 +0000 (14:33 +0100)] 
Merge pull request #12289 from omoerbeek/rec-unsupported-qtype

rec: refactor unsuppored qtype code and make sure we ServFail on all unsupported qtypes

2 years agoMerge pull request #12285 from mind04/auth-api-consumer
Peter van Dijk [Wed, 7 Dec 2022 13:15:44 +0000 (14:15 +0100)] 
Merge pull request #12285 from mind04/auth-api-consumer

auth: api, do not create SOA and NS records for consumer zones

2 years agoOnly raise the limit to 1M if the current is lower than 1M 11554/head
Otto Moerbeek [Wed, 7 Dec 2022 13:09:56 +0000 (14:09 +0100)] 
Only raise the limit to 1M if the current is lower than 1M

2 years agoElaborate on NSEC/NSEC3 diffference in comment 12289/head
Otto Moerbeek [Wed, 7 Dec 2022 12:37:13 +0000 (13:37 +0100)] 
Elaborate on NSEC/NSEC3 diffference in comment

2 years agoApply suggestions from code review
Otto Moerbeek [Wed, 7 Dec 2022 12:30:19 +0000 (13:30 +0100)] 
Apply suggestions from code review

Co-authored-by: Peter van Dijk <peter.van.dijk@powerdns.com>
2 years agoMerge pull request #12288 from rgacogne/fix-spelling
Remi Gacogne [Wed, 7 Dec 2022 12:15:54 +0000 (13:15 +0100)] 
Merge pull request #12288 from rgacogne/fix-spelling

Fix a typo and allow 'byteslimit'

2 years agoMerge pull request #11065 from pieterlexis/sd-protectproc
Remi Gacogne [Wed, 7 Dec 2022 12:14:32 +0000 (13:14 +0100)] 
Merge pull request #11065 from pieterlexis/sd-protectproc

service files: Add more sandboxing options

2 years agoMerge pull request #12185 from PenelopeFudd/master
Peter van Dijk [Wed, 7 Dec 2022 11:05:17 +0000 (12:05 +0100)] 
Merge pull request #12185 from PenelopeFudd/master

Enhancing dnsupdate documentation

2 years agoCoverity 1501408: Uninitialized scalar field 12290/head
Otto Moerbeek [Wed, 7 Dec 2022 10:54:01 +0000 (11:54 +0100)] 
Coverity 1501408: Uninitialized scalar field

2 years agoMerge pull request #12216 from kpfleming/catalog-zone-doc-clarifications
Peter van Dijk [Wed, 7 Dec 2022 10:21:56 +0000 (11:21 +0100)] 
Merge pull request #12216 from kpfleming/catalog-zone-doc-clarifications

Small clarifications to docs for API usage with catalog zones.

2 years agoIncorporate comments from @rgacogne
Otto Moerbeek [Wed, 7 Dec 2022 09:09:25 +0000 (10:09 +0100)] 
Incorporate comments from @rgacogne

2 years agorec: refactor unsuppored qtype code and make sure we ServFail on all unsupported...
Otto Moerbeek [Wed, 7 Dec 2022 09:54:49 +0000 (10:54 +0100)] 
rec: refactor unsuppored qtype code and make sure we ServFail on all unsupported qtypes

This fixes #12251

Also I'd like to know why we ServFail on NSEC3 but not on NSEC: we should either fix that or add a comment explaining this.

2 years agorec: Fix a typo in the doc 12288/head
Remi Gacogne [Wed, 7 Dec 2022 09:05:20 +0000 (10:05 +0100)] 
rec: Fix a typo in the doc

2 years agospell-check: Allow 'byteslimit' (name of a parameter to a Lua function)
Remi Gacogne [Wed, 7 Dec 2022 09:04:50 +0000 (10:04 +0100)] 
spell-check: Allow 'byteslimit' (name of a parameter to a Lua function)

2 years agoMerge pull request #12287 from Habbie/fix-tinydns-data
Peter van Dijk [Wed, 7 Dec 2022 09:03:23 +0000 (10:03 +0100)] 
Merge pull request #12287 from Habbie/fix-tinydns-data

auth: fix tinydns data, missed this spot in #12279

2 years agosystemd service: Only enable MemoryDenyWriteExecute for ixfrdist 11065/head
Remi Gacogne [Tue, 29 Nov 2022 15:10:57 +0000 (16:10 +0100)] 
systemd service: Only enable MemoryDenyWriteExecute for ixfrdist

Because it does not play well with LuaJIT, which all other products
use.

2 years agosystemd service: disallow access to devices (except, zero, full, null, random, urandom)
Pieter Lexis [Fri, 3 Dec 2021 12:08:09 +0000 (13:08 +0100)] 
systemd service: disallow access to devices (except, zero, full, null, random, urandom)

2 years agosystemd service: lock down IPC
Pieter Lexis [Fri, 3 Dec 2021 12:04:57 +0000 (13:04 +0100)] 
systemd service: lock down IPC

2 years agoservice files: Add MemoryDenyWriteExecute
Pieter Lexis [Fri, 3 Dec 2021 10:01:00 +0000 (11:01 +0100)] 
service files: Add MemoryDenyWriteExecute

This disallows the services to write executable memory.

2 years agoservice files: Add ProtectProc
Pieter Lexis [Fri, 3 Dec 2021 09:37:46 +0000 (10:37 +0100)] 
service files: Add ProtectProc

Another sandboxing option,
[ProtectProc](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectProc=)
hides all /proc/<pid> that are not owned by the service user and hides
some kernel things from /proc as well.

2 years agodnsdist: Rename the field containing the TCP worker thread ID 12281/head
Remi Gacogne [Wed, 7 Dec 2022 08:56:37 +0000 (09:56 +0100)] 
dnsdist: Rename the field containing the TCP worker thread ID

2 years agoMerge pull request #12248 from kpfleming/issue-11153
Remi Gacogne [Wed, 7 Dec 2022 08:42:25 +0000 (09:42 +0100)] 
Merge pull request #12248 from kpfleming/issue-11153

systemd: Add "After" dependency on time-sync.target

2 years agoMerge pull request #12237 from rgacogne/ddist-unscrew-resumption-ossl3
Remi Gacogne [Wed, 7 Dec 2022 08:33:31 +0000 (09:33 +0100)] 
Merge pull request #12237 from rgacogne/ddist-unscrew-resumption-ossl3

dnsdist: Ignore unclean TLS session shutdown

2 years agoMerge pull request #12283 from rgacogne/ddist-fix-long-double-warning
Remi Gacogne [Wed, 7 Dec 2022 08:33:23 +0000 (09:33 +0100)] 
Merge pull request #12283 from rgacogne/ddist-fix-long-double-warning

dnsdist: Fix a warning about long to double conversion

2 years agoShort Description:
Yogesh Singh [Sun, 17 Apr 2022 11:47:00 +0000 (17:17 +0530)] 
Short Description:
Raise RLIMIT_MEMLOCK automatically when eBPF is requested.

This PR adds changes to eBPF filter constructor which when invoked automatically raises the RLIMIT_MEMLOCK from 64k to 1024k.
The hard limit for the user needs to be set in `/etc/security/limits.conf`.

2 years agoauth: fix tinydns data, missed this spot in #12279 12287/head
Peter van Dijk [Tue, 6 Dec 2022 18:02:31 +0000 (19:02 +0100)] 
auth: fix tinydns data, missed this spot in #12279

2 years agoauth: api, add create/delete consumer zone test 12285/head
Kees Monshouwer [Tue, 6 Dec 2022 17:34:09 +0000 (18:34 +0100)] 
auth: api, add create/delete consumer zone test

2 years agoauth: api, do not create SOA and NS records for consumer zones
Kees Monshouwer [Tue, 6 Dec 2022 17:29:16 +0000 (18:29 +0100)] 
auth: api, do not create SOA and NS records for consumer zones

2 years agodnsdist: Fix a warning about long to double conversion 12283/head
Remi Gacogne [Tue, 6 Dec 2022 16:43:12 +0000 (17:43 +0100)] 
dnsdist: Fix a warning about long to double conversion

```
dnsdist-backend.cc:601:61: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
      if (backOffCoeffTmp != HUGE_VAL && backOffCoeffTmp <= std::numeric_limits<time_t>::max()) {
                                                         ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

2 years agodnsdist: Get rid of TCPCrossProtocolQuerySender
Remi Gacogne [Fri, 2 Dec 2022 14:57:17 +0000 (15:57 +0100)] 
dnsdist: Get rid of TCPCrossProtocolQuerySender

We need this construct to deal with cross-protocol queries, like
queries received over TCP or DoT, but forwarded over DoH, because
the thread dealing with the client and the one dealing with the
backend will not be the same in that case, and we do not want to
have different threads touching the same TCP connections.
So we pass the query and response to the correct thread via pipes.
Until now we were allocating an additional object, TCPCrossProtocolQuerySender,
to deal with that case, but I noticed that the existing IncomingTCPConnectionState
object already does everything we need, except that it needs to
know that the response is a cross-protocol one in order to pass it
via the pipe instead of treating it in a different way. This can be
done by looking if the current thread ID differs from the one that
created this object: if it does, we are dealing with a cross-protocol
response and should pass it via the pipe, and if it does not we
can deal with it directly.
This change saves the need to allocate a new object wrapped in a
shared pointer for each cross-protocol query, which is quite nice.

2 years agoMerge pull request #12276 from rgacogne/ddist-less-wakeups
Remi Gacogne [Tue, 6 Dec 2022 15:51:00 +0000 (16:51 +0100)] 
Merge pull request #12276 from rgacogne/ddist-less-wakeups

dnsdist: Reduce useless wake-ups from the event loop

2 years agoMerge pull request #12278 from rgacogne/ddist-prevent-allocs
Remi Gacogne [Tue, 6 Dec 2022 15:50:41 +0000 (16:50 +0100)] 
Merge pull request #12278 from rgacogne/ddist-prevent-allocs

dnsdist: Small improvements

2 years agodnsdist: Add a new chain of rules triggered after cache insertion
Remi Gacogne [Tue, 6 Dec 2022 15:23:04 +0000 (16:23 +0100)] 
dnsdist: Add a new chain of rules triggered after cache insertion

The general idea is to be able to store the unedited version into
the cache while delivering a different version to the actual client.
This is useful when one is sending different answers to different
clients, like when dealing with abuse traffic, but still want to be
able to cache the initial response from the backend.
We already have a chain of rules that are triggered after a cache-hit,
but until now we lacked the ability to trigger after getting the
response corresponding to a cache-miss.

2 years agoMerge pull request #12279 from Habbie/auth-test-ordername
Peter van Dijk [Tue, 6 Dec 2022 15:16:20 +0000 (16:16 +0100)] 
Merge pull request #12279 from Habbie/auth-test-ordername

auth: add ordername testing

2 years agoadd ordername testing 12279/head
Peter van Dijk [Tue, 6 Dec 2022 14:40:51 +0000 (15:40 +0100)] 
add ordername testing

2 years agoMerge pull request #12275 from rgacogne/ddist-andor-modern
Remi Gacogne [Tue, 6 Dec 2022 14:25:15 +0000 (15:25 +0100)] 
Merge pull request #12275 from rgacogne/ddist-andor-modern

dnsdist: Refactor AndRule and OrRule to modern C++ loops

2 years agoMerge pull request #12218 from nneul/patch-1
Otto Moerbeek [Tue, 6 Dec 2022 12:11:31 +0000 (13:11 +0100)] 
Merge pull request #12218 from nneul/patch-1

rec: Document negation of netmasks in settings.rst

2 years agoMerge pull request #12277 from chbruyand/auth-ifurlup-byteslimit
Peter van Dijk [Tue, 6 Dec 2022 12:09:49 +0000 (13:09 +0100)] 
Merge pull request #12277 from chbruyand/auth-ifurlup-byteslimit

auth: add byteslimit support to lua ifurlup() function

2 years agodnsdist: Only allocate a ConnectionInfo object when actually needed 12278/head
Remi Gacogne [Thu, 10 Nov 2022 11:11:45 +0000 (12:11 +0100)] 
dnsdist: Only allocate a ConnectionInfo object when actually needed