]> git.ipfire.org Git - thirdparty/pdns.git/log
thirdparty/pdns.git
3 years agoTest case for a record becoming available from an auth while being served stale ...
Otto Moerbeek [Fri, 20 Jan 2023 15:08:47 +0000 (16:08 +0100)] 
Test case for a record becoming available from an auth while being served stale (negatively) by rec.

3 years agoMerge pull request #12421 from rgacogne/ddist-skip-invalid-ocsp
Remi Gacogne [Fri, 20 Jan 2023 15:07:48 +0000 (16:07 +0100)] 
Merge pull request #12421 from rgacogne/ddist-skip-invalid-ocsp

dnsdist: Skip invalid OCSP files after issuing a warning

3 years agomissing word in comment
Otto Moerbeek [Fri, 20 Jan 2023 14:38:40 +0000 (15:38 +0100)] 
missing word in comment

Co-authored-by: Remi Gacogne <github@coredump.fr>
3 years agotypo in comment
Otto Moerbeek [Fri, 20 Jan 2023 14:34:08 +0000 (15:34 +0100)] 
typo in comment

Co-authored-by: Remi Gacogne <github@coredump.fr>
3 years agotypo
Otto Moerbeek [Fri, 20 Jan 2023 14:12:03 +0000 (15:12 +0100)] 
typo

Co-authored-by: Matt Nordhoff <mnordhoff@mattnordhoff.com>
3 years agoAdd a bit more explanation to advisory. 12445/head
Otto Moerbeek [Fri, 20 Jan 2023 13:42:39 +0000 (14:42 +0100)] 
Add a bit more explanation to advisory.

Also, attribution line was lost.

3 years agoBe a bit more conservative, only clean specific (neg)cache entries if needed
Otto Moerbeek [Fri, 20 Jan 2023 13:14:00 +0000 (14:14 +0100)] 
Be a bit more conservative, only clean specific (neg)cache entries if needed
*and* server-stale is active

3 years agoASAN is greedy, give it bigger stacks 12444/head
Otto Moerbeek [Mon, 2 Jan 2023 15:28:24 +0000 (16:28 +0100)] 
ASAN is greedy, give it bigger stacks

3 years agoDo *not* use QName Minimization for DS retrievals in QM fallback mode.
Otto Moerbeek [Mon, 2 Jan 2023 14:49:38 +0000 (15:49 +0100)] 
Do *not* use QName Minimization for DS retrievals in QM fallback mode.

3 years agoMerge pull request #12431 from fredmorcos/gh-actions-docs
Otto Moerbeek [Fri, 20 Jan 2023 12:04:59 +0000 (13:04 +0100)] 
Merge pull request #12431 from fredmorcos/gh-actions-docs

Migration of CircleCI documentation generation and upload to Github Actions

3 years agoMerge pull request #12443 from omoerbeek/rec-prep-4.8.1
Otto Moerbeek [Fri, 20 Jan 2023 11:52:07 +0000 (12:52 +0100)] 
Merge pull request #12443 from omoerbeek/rec-prep-4.8.1

rec: Prep for rec-4.8.1

3 years agoPrep for rec-4.8.1 12443/head
Otto Moerbeek [Wed, 18 Jan 2023 08:55:43 +0000 (09:55 +0100)] 
Prep for rec-4.8.1

3 years agoAdd a configure option to enable LTO 12441/head
Remi Gacogne [Fri, 20 Jan 2023 11:41:32 +0000 (12:41 +0100)] 
Add a configure option to enable LTO

The supported options are:
- thin: this is the recommended option for clang, as it is more
  scalable. It automatically determines the number of CPU cores
  to use. It requires support in the linker as well.
- auto: this is the recommended option for GCC, and a valid
  fallback for clang when 'thin' is not supported. It automatically
  determines the number of CPU cores to use as well.
- yes: this translates to '-flto', which will use a single CPU core
  in most cases, but is a valid fallback.
- no: LTO is disabled.

3 years agoMerge pull request #12439 from rgacogne/fix-dnsreplay-man
Remi Gacogne [Fri, 20 Jan 2023 11:36:08 +0000 (12:36 +0100)] 
Merge pull request #12439 from rgacogne/fix-dnsreplay-man

dnsreplay: Fix formatting in the man page

3 years agolibssl: Use decltype(&SSL_CTX_free) as suggested by Fred 12421/head
Remi Gacogne [Fri, 20 Jan 2023 11:00:10 +0000 (12:00 +0100)] 
libssl: Use decltype(&SSL_CTX_free) as suggested by Fred

3 years agodnsdist: Skip invalid OCSP files after issuing a warning
Remi Gacogne [Mon, 16 Jan 2023 14:28:02 +0000 (15:28 +0100)] 
dnsdist: Skip invalid OCSP files after issuing a warning

Contrary to certificates and keys, OCSP files are never required to
provide a working DoT or DoH service, so it's better to start even
if would not load all, or any, OCSP files.

3 years agoMerge pull request #12435 from rgacogne/ddist-failure-server-ctx
Remi Gacogne [Fri, 20 Jan 2023 10:54:05 +0000 (11:54 +0100)] 
Merge pull request #12435 from rgacogne/ddist-failure-server-ctx

dnsdist: Gracefully handle a failure to create a TLS server context

3 years agodnsreplay: Fix formatting in the man page 12439/head
Remi Gacogne [Fri, 20 Jan 2023 10:51:08 +0000 (11:51 +0100)] 
dnsreplay: Fix formatting in the man page

3 years agoRemove unused CircleCI documentation generator and upload workflows 12431/head
Fred Morcos [Wed, 18 Jan 2023 15:38:42 +0000 (16:38 +0100)] 
Remove unused CircleCI documentation generator and upload workflows

3 years agoGithub Actions workflow to generate and upload documentation
Fred Morcos [Tue, 17 Jan 2023 23:03:56 +0000 (00:03 +0100)] 
Github Actions workflow to generate and upload documentation

3 years agoFix heading of Documentation section under Compiling the Recursor
Fred Morcos [Thu, 19 Jan 2023 08:50:35 +0000 (09:50 +0100)] 
Fix heading of Documentation section under Compiling the Recursor

3 years agodocs/Makefiles: Whitespace cleanup
Fred Morcos [Tue, 17 Jan 2023 23:01:54 +0000 (00:01 +0100)] 
docs/Makefiles: Whitespace cleanup

3 years agotasks.py: Missing commas
Fred Morcos [Tue, 17 Jan 2023 14:25:22 +0000 (15:25 +0100)] 
tasks.py: Missing commas

3 years agoGitignore: Add .venv
Fred Morcos [Thu, 19 Jan 2023 08:43:22 +0000 (09:43 +0100)] 
Gitignore: Add .venv

3 years agodnsdist: Use pdns::OpenSSL::error and decltype() 12435/head
Remi Gacogne [Wed, 18 Jan 2023 15:43:25 +0000 (16:43 +0100)] 
dnsdist: Use pdns::OpenSSL::error and decltype()

As suggested by Fred (thanks!).

3 years agoAdd a test to check that we can use the specified stack size
Otto Moerbeek [Wed, 18 Jan 2023 14:52:57 +0000 (15:52 +0100)] 
Add a test to check that we can use the specified stack size

Actual test of the guard pages can be done, but is hard to fit in the test framework.
To test manually decrease the headroom const to 0

3 years agodnsdist: Gracefully handle a failure to create a TLS server context
Remi Gacogne [Wed, 18 Jan 2023 13:58:55 +0000 (14:58 +0100)] 
dnsdist: Gracefully handle a failure to create a TLS server context

3 years agoSome cases of d_prefix vs prefix were missed previously
Otto Moerbeek [Wed, 18 Jan 2023 13:10:12 +0000 (14:10 +0100)] 
Some cases of d_prefix vs prefix were missed previously

3 years agoFix VLOG in !rec case, gcc does not like #define X #error ...
Otto Moerbeek [Tue, 17 Jan 2023 14:14:45 +0000 (15:14 +0100)] 
Fix VLOG in !rec case, gcc does not like #define X #error ...

3 years agoReformat
Otto Moerbeek [Tue, 17 Jan 2023 14:10:58 +0000 (15:10 +0100)] 
Reformat

3 years agoconst correctness and better macro defined in logger.hh instead of two spots
Otto Moerbeek [Tue, 17 Jan 2023 11:18:02 +0000 (12:18 +0100)] 
const correctness and better macro defined in logger.hh instead of two spots

3 years agoRemove remains of g_dnssecLOG
Otto Moerbeek [Tue, 17 Jan 2023 09:59:04 +0000 (10:59 +0100)] 
Remove remains of g_dnssecLOG

It was never set from !recursor and has the same value as trace in
rec.  Now validationo logging goes the same  as other trace handling,
so trace-regex also shows validation.

3 years agoAvoid recomputing prefix all the time, pass it as a argument if possible
Otto Moerbeek [Mon, 16 Jan 2023 15:37:58 +0000 (16:37 +0100)] 
Avoid recomputing prefix all the time, pass it as a argument if possible

3 years agoConsistently use prefix and mark trace regex lines
Otto Moerbeek [Mon, 16 Jan 2023 10:31:51 +0000 (11:31 +0100)] 
Consistently use prefix and mark trace regex lines

3 years agoPrefix helper method
Otto Moerbeek [Mon, 16 Jan 2023 10:00:13 +0000 (11:00 +0100)] 
Prefix helper method

3 years agoPlumbing to let validate.cc and aggressive-nsec.cc use the recursor trace logging
Otto Moerbeek [Wed, 11 Jan 2023 14:25:27 +0000 (15:25 +0100)] 
Plumbing to let validate.cc and aggressive-nsec.cc use the recursor trace logging

Until now the logging of the DNSSEC code used it's own logging, which has
the consequence that prefixed, tracing and indenditng all worked differently
compared to the regular (trace) logging in rec.

So provide a construct to unify them without exposing syncres
internals to the validation code.

3 years agoMerge pull request #12425 from omoerbeek/rec-forward-nord
Otto Moerbeek [Wed, 18 Jan 2023 08:44:38 +0000 (09:44 +0100)] 
Merge pull request #12425 from omoerbeek/rec-forward-nord

rec: Change the way RD=0 forwarded queries are handled.

3 years agoMerge pull request #12428 from rgacogne/moved-credentials
Remi Gacogne [Wed, 18 Jan 2023 08:43:49 +0000 (09:43 +0100)] 
Merge pull request #12428 from rgacogne/moved-credentials

credentials: Explicitly clear credentials once they have been moved

3 years agoEnable the highest supported level of FORTIFY_SOURCE in our CI tests 12433/head
Remi Gacogne [Wed, 18 Jan 2023 08:24:13 +0000 (09:24 +0100)] 
Enable the highest supported level of FORTIFY_SOURCE in our CI tests

3 years agocredentials: Explicitly clear credentials once they have been moved 12428/head
Remi Gacogne [Tue, 17 Jan 2023 16:52:09 +0000 (17:52 +0100)] 
credentials: Explicitly clear credentials once they have been moved

3 years agoAdd a new configure option to initialize automatic variables 12427/head
Remi Gacogne [Tue, 17 Jan 2023 16:31:52 +0000 (17:31 +0100)] 
Add a new configure option to initialize automatic variables

The new option, `--enable-auto-var-init`, when enabled, sets the
`-ftrivial-auto-var-init` flag when supported by the compiler
(GCC 12+, clang 16+) to either:
- `zero`: zero-initializes all automatic variables, and is enabled
  with `--enable-auto-var-init=yes` or `--enable-auto-var-init=zero`.
  This can be used as a hardening measure in production, reducing
  information leakage issues.
- `pattern`: initialize all automatic variables to a pattern that
  is likely to be detected, like 0xAA, and is enabled via
  `--enable-auto-var-init=pattern`. This is useful in tests,
  especially when the cost of sanitizers is too high.

I have not done any performance testing, but the zero option is
generally considered to have a less than 5% performance cost.

3 years agodnsdist: Document what happens on cache hit, miss after resumption
Remi Gacogne [Tue, 17 Jan 2023 15:33:33 +0000 (16:33 +0100)] 
dnsdist: Document what happens on cache hit, miss after resumption

3 years agodnsdist: Fix time computation in the async unit tests
Remi Gacogne [Tue, 17 Jan 2023 15:33:06 +0000 (16:33 +0100)] 
dnsdist: Fix time computation in the async unit tests

3 years agodnsdist: Better documentation for `DNSQuestion:restart()`
Remi Gacogne [Tue, 17 Jan 2023 15:32:24 +0000 (16:32 +0100)] 
dnsdist: Better documentation for `DNSQuestion:restart()`

3 years agodnsdist: Document the valid ranges for the asynchronous identifiers
Remi Gacogne [Tue, 17 Jan 2023 15:31:23 +0000 (16:31 +0100)] 
dnsdist: Document the valid ranges for the asynchronous identifiers

3 years agodnsdist: Better documentation for `DNSQuestion:restart()`
Remi Gacogne [Tue, 17 Jan 2023 15:30:48 +0000 (16:30 +0100)] 
dnsdist: Better documentation for `DNSQuestion:restart()`

3 years agodnsdist: Cleanly round the elapsed time to the nearest microseconds
Remi Gacogne [Tue, 17 Jan 2023 15:29:59 +0000 (16:29 +0100)] 
dnsdist: Cleanly round the elapsed time to the nearest microseconds

3 years agoMerge pull request #12415 from rgacogne/ddist-improv
Remi Gacogne [Tue, 17 Jan 2023 11:31:33 +0000 (12:31 +0100)] 
Merge pull request #12415 from rgacogne/ddist-improv

dnsdist: Small improvements

3 years agoChange the way RD=0 forwarded queries are handled. 12425/head
Otto Moerbeek [Tue, 17 Jan 2023 09:00:30 +0000 (10:00 +0100)] 
Change the way RD=0 forwarded queries are handled.

Since forever, there has been special case code for forwarded queries
in the RD=0 case.  This special case code does a hardcoded RD=0
query to the specified forwarder.  This code has two consequences:

1. Even if the forwarder is marked recursive it gets a RD=0 query
2. The cache is not consulted at all

The corresponding unit tests actually test this behaviour, but after
historic digging with help from @rgacogne it turns out the the unit
test do not reflect the desired functionality, but the current state
of affairs to help with a refactoring PR.  That is good, since
refactoring should not change functionality.

But now the time has come to change the code to do the desired thing:

1. If an RD=0 query is received, do a cache only-lookup in all cases.
2. Never send a RD=0 query to a recursive forwarder

I already did a similar thing when I wrote the QName Minimization
code, introducing a conditional that only gets set for that case,
to avoid changing unrelated (to QM) functionality.

3 years agoMerge pull request #12381 from rgacogne/fortify-3
Remi Gacogne [Tue, 17 Jan 2023 08:53:53 +0000 (09:53 +0100)] 
Merge pull request #12381 from rgacogne/fortify-3

Enable FORTIFY_SOURCE=3 when supported by the compiler

3 years agoMerge pull request #12420 from omoerbeek/rec-README
Otto Moerbeek [Tue, 17 Jan 2023 08:11:16 +0000 (09:11 +0100)] 
Merge pull request #12420 from omoerbeek/rec-README

rec: README tweaks, .md does not know :program:`...`

3 years agodnsdist: Better handling of multiple carbon servers
Remi Gacogne [Mon, 16 Jan 2023 17:20:28 +0000 (18:20 +0100)] 
dnsdist: Better handling of multiple carbon servers

3 years agoMerge pull request #12407 from omoerbeek/rec-ecs-chaining
Otto Moerbeek [Mon, 16 Jan 2023 15:15:09 +0000 (16:15 +0100)] 
Merge pull request #12407 from omoerbeek/rec-ecs-chaining

rec: do not chain ecs enabled queries

3 years agoMerge pull request #12419 from omoerbeek/rec-close-fd-on-fdopen-fail
Otto Moerbeek [Mon, 16 Jan 2023 15:06:15 +0000 (16:06 +0100)] 
Merge pull request #12419 from omoerbeek/rec-close-fd-on-fdopen-fail

rec: negcache dump code: close fd on fdopen fail

3 years agodnsdist: Document interactions between XFR, NOTIFY and the cache
Remi Gacogne [Mon, 16 Jan 2023 14:55:28 +0000 (15:55 +0100)] 
dnsdist: Document interactions between XFR, NOTIFY and the cache

3 years agorec: README tweaks, .md does not know :program:`...` 12420/head
Otto Moerbeek [Mon, 16 Jan 2023 14:24:15 +0000 (15:24 +0100)] 
rec: README tweaks, .md does not know :program:`...`

3 years agoMerge pull request #12364 from rgacogne/rec-doc-compiling
Otto Moerbeek [Mon, 16 Jan 2023 14:15:30 +0000 (15:15 +0100)] 
Merge pull request #12364 from rgacogne/rec-doc-compiling

rec: In compiling docs, warn about the GH tarballs, add deps from README

3 years agoMerge pull request #12396 from omoerbeek/stringerror-thread-safe
Otto Moerbeek [Mon, 16 Jan 2023 14:10:22 +0000 (15:10 +0100)] 
Merge pull request #12396 from omoerbeek/stringerror-thread-safe

Introduce a thread-safe version of stringerror()

3 years agoClose fd on fdopen fail. 12419/head
Otto Moerbeek [Mon, 16 Jan 2023 13:25:11 +0000 (14:25 +0100)] 
Close fd on fdopen fail.

Originally suggested by @rgacogne, but not included in the merge of #12374
somehow.

3 years agoMerge pull request #12412 from fredmorcos/openssl3-tls-mac
Remi Gacogne [Mon, 16 Jan 2023 08:52:52 +0000 (09:52 +0100)] 
Merge pull request #12412 from fredmorcos/openssl3-tls-mac

OpenSSL 3.0: TLS MAC handling

3 years agoMerge pull request #12416 from Habbie/variable-mirror
Remi Gacogne [Mon, 16 Jan 2023 08:51:28 +0000 (09:51 +0100)] 
Merge pull request #12416 from Habbie/variable-mirror

build-and-test-all: add functionality to quickly switch ubuntu mirrors

3 years agobuild-and-test-all: add functionality to quickly switch ubuntu mirrors 12416/head
Peter van Dijk [Fri, 13 Jan 2023 10:06:14 +0000 (11:06 +0100)] 
build-and-test-all: add functionality to quickly switch ubuntu mirrors

3 years agodnsdist: Document the 'restart' feature
Remi Gacogne [Thu, 12 Jan 2023 11:00:58 +0000 (12:00 +0100)] 
dnsdist: Document the 'restart' feature

3 years agodnsdist: FFI interface for the Lua network endpoint
Remi Gacogne [Thu, 23 Jun 2022 16:08:38 +0000 (18:08 +0200)] 
dnsdist: FFI interface for the Lua network endpoint

3 years agodnsdist: Add documentation for suspending/resuming objects
Remi Gacogne [Tue, 10 Jan 2023 13:53:29 +0000 (14:53 +0100)] 
dnsdist: Add documentation for suspending/resuming objects

3 years agodnsdist: Add the infrastructure for restartable queries
Remi Gacogne [Thu, 22 Dec 2022 16:32:05 +0000 (17:32 +0100)] 
dnsdist: Add the infrastructure for restartable queries

3 years agodnsdist: Add regression tests for the regular Lua async bindings
Remi Gacogne [Wed, 21 Dec 2022 13:13:29 +0000 (14:13 +0100)] 
dnsdist: Add regression tests for the regular Lua async bindings

3 years agodnsdist: Add regular Lua bindings for async handling of queries
Remi Gacogne [Wed, 21 Dec 2022 13:13:10 +0000 (14:13 +0100)] 
dnsdist: Add regular Lua bindings for async handling of queries

3 years agodnsdist: Add regression tests for asynchronous processing
Remi Gacogne [Thu, 16 Dec 2021 16:00:40 +0000 (17:00 +0100)] 
dnsdist: Add regression tests for asynchronous processing

3 years agodnsdist: Implement async processing of queries and responses
Remi Gacogne [Fri, 16 Dec 2022 17:31:33 +0000 (18:31 +0100)] 
dnsdist: Implement async processing of queries and responses

3 years agoMerge pull request #12405 from rgacogne/ddist-frontend-responses
Remi Gacogne [Fri, 13 Jan 2023 15:51:01 +0000 (16:51 +0100)] 
Merge pull request #12405 from rgacogne/ddist-frontend-responses

dnsdist: Proper accounting of response and cache hits

3 years agoMerge pull request #12386 from rgacogne/single-doh-acceptor
Remi Gacogne [Fri, 13 Jan 2023 15:50:24 +0000 (16:50 +0100)] 
Merge pull request #12386 from rgacogne/single-doh-acceptor

dnsdist: Merge the 'main' and 'client' DoH threads in single acceptor mode

3 years agoMerge pull request #12384 from rgacogne/ddist-cap-ttl
Remi Gacogne [Fri, 13 Jan 2023 14:40:17 +0000 (15:40 +0100)] 
Merge pull request #12384 from rgacogne/ddist-cap-ttl

dnsdist: Add the ability to cap the TTL of records after insertion into the cache

3 years agodnsdist: Add more unit tests for the packet overlay 12415/head
Remi Gacogne [Fri, 13 Jan 2023 13:02:09 +0000 (14:02 +0100)] 
dnsdist: Add more unit tests for the packet overlay

3 years agom4: Fix interleaved output during `FORTIFY_SOURCE` detection 12381/head
Remi Gacogne [Fri, 13 Jan 2023 09:25:41 +0000 (10:25 +0100)] 
m4: Fix interleaved output during `FORTIFY_SOURCE` detection

3 years agoMerge pull request #12411 from fredmorcos/openssl3-ipcipher-ca6-crypto
Remi Gacogne [Fri, 13 Jan 2023 08:32:12 +0000 (09:32 +0100)] 
Merge pull request #12411 from fredmorcos/openssl3-ipcipher-ca6-crypto

Support OpenSSL 3.0 for ipcipher CA6 encryption/decryption

3 years agoOpenSSL 3.0: TLS MAC handling 12412/head
Fred Morcos [Mon, 9 Jan 2023 12:56:37 +0000 (13:56 +0100)] 
OpenSSL 3.0: TLS MAC handling

3 years agolibssl: Cleanup TLS-related code
Fred Morcos [Mon, 9 Jan 2023 11:33:34 +0000 (12:33 +0100)] 
libssl: Cleanup TLS-related code

3 years agolibssl: Formatting TLS-related code
Fred Morcos [Mon, 9 Jan 2023 11:31:21 +0000 (12:31 +0100)] 
libssl: Formatting TLS-related code

3 years agodnsdist: Appease the formatting gods
Remi Gacogne [Thu, 12 Jan 2023 15:01:50 +0000 (16:01 +0100)] 
dnsdist: Appease the formatting gods

3 years agoMerge pull request #12403 from rgacogne/spell-allow-eaca
Remi Gacogne [Thu, 12 Jan 2023 14:56:58 +0000 (15:56 +0100)] 
Merge pull request #12403 from rgacogne/spell-allow-eaca

spell-checker: Allow EACA (from the PGP public keys in the docs)

3 years agodnsdist: Use smaller event buffers in our socket multiplexers
Remi Gacogne [Thu, 12 Jan 2023 14:55:32 +0000 (15:55 +0100)] 
dnsdist: Use smaller event buffers in our socket multiplexers

3 years agodnsdist: Silence a warning about an unused variable in discovery.cc
Remi Gacogne [Thu, 12 Jan 2023 14:50:40 +0000 (15:50 +0100)] 
dnsdist: Silence a warning about an unused variable in discovery.cc

3 years agodnsdist: Remove a duplicated ';' in dnsdist-lua-actions.cc
Remi Gacogne [Thu, 12 Jan 2023 14:49:56 +0000 (15:49 +0100)] 
dnsdist: Remove a duplicated ';' in dnsdist-lua-actions.cc

3 years agocredentials: Add more unit tests
Remi Gacogne [Thu, 12 Jan 2023 14:49:03 +0000 (15:49 +0100)] 
credentials: Add more unit tests

3 years agoauth: Even better interface for setKey() 11600/head
Remi Gacogne [Tue, 29 Nov 2022 11:02:23 +0000 (12:02 +0100)] 
auth: Even better interface for setKey()

3 years agoauth: Better interface for setKey() by requiring the flags
Remi Gacogne [Tue, 29 Nov 2022 10:43:36 +0000 (11:43 +0100)] 
auth: Better interface for setKey() by requiring the flags

3 years agoauth: Compute the public key only once, when creating the private one
Remi Gacogne [Tue, 31 May 2022 19:51:46 +0000 (21:51 +0200)] 
auth: Compute the public key only once, when creating the private one

Note that one big drawback is that setKey() should NO LONGER be used
before the algo and flags have been set.

3 years agoauth: Rename the function computing the hash of public keys
Remi Gacogne [Mon, 23 May 2022 11:22:47 +0000 (13:22 +0200)] 
auth: Rename the function computing the hash of public keys

As suggested by Fred Morcos (thanks!).

3 years agoauth: Speed up ECDSA and RSA signatures
Remi Gacogne [Mon, 2 May 2022 09:46:38 +0000 (11:46 +0200)] 
auth: Speed up ECDSA and RSA signatures

For ECDSA, and likely for RSA, computing the public key is not a cheap
operation. So instead of computing it twice to get the lookup key for
our signatures cache, reuse the computed public key and only compute its
digest.
In addition, since ed* algorithms were already using the whole key instead
of a digest, place the cut off at public keys larger than 64 bytes, meaning
that only RSA ones (128+ bytes) will be hashed.
This provides an additional speedup for ECDSA keys (32 or 48 bytes) since
they no longer need to be hashed, and simplifies the signers code as the
hashing can be moved to the key cache now that it only depends on they key
size.
For reference the size of a SHA-1 digest is 20 bytes.

In my tests this reduces by 30% the cost of calling addRRSigs() for ECDSA
signatures when the signature is already present in the cache.

3 years agoOpenSSL 3.0: decryptCA6 12411/head
Fred Morcos [Thu, 3 Nov 2022 09:21:03 +0000 (10:21 +0100)] 
OpenSSL 3.0: decryptCA6

3 years agoOpenSSL 3.0: encryptCA6
Fred Morcos [Thu, 3 Nov 2022 08:03:52 +0000 (09:03 +0100)] 
OpenSSL 3.0: encryptCA6

3 years agospell-checker: Allow prometheus values 12405/head
Remi Gacogne [Mon, 9 Jan 2023 16:26:53 +0000 (17:26 +0100)] 
spell-checker: Allow prometheus values

3 years agodnsdist: Fix a typo in the prometheus type
Remi Gacogne [Mon, 9 Jan 2023 16:26:34 +0000 (17:26 +0100)] 
dnsdist: Fix a typo in the prometheus type

3 years agodnsdist: Update the prometheus sample in the documentation
Remi Gacogne [Mon, 9 Jan 2023 16:19:46 +0000 (17:19 +0100)] 
dnsdist: Update the prometheus sample in the documentation

It was very old and not up-to-date.

3 years agodnsdist: Only record one hit or miss per query in the cache metrics
Remi Gacogne [Mon, 9 Jan 2023 16:17:21 +0000 (17:17 +0100)] 
dnsdist: Only record one hit or miss per query in the cache metrics

The scope-zero feature and the DoH paths can actually do more than
one lookup per query, and until now this led to an increase of the
per-cache metric for every lookup, while the global `cache-hits`
and `cache-misses` metrics were only updated once per query.
This has led to several questions and misunderstandings, so we now
only update the per-cache metrics once per query as well.

3 years agodnsdist: Properly record cache-hits as responses
Remi Gacogne [Mon, 9 Jan 2023 16:15:03 +0000 (17:15 +0100)] 
dnsdist: Properly record cache-hits as responses

For a very long time we have not been adding cache-hits to the
responses counter, which is wrong. Let's fix it now.

3 years agoCleanup ipcipher.hh
Fred Morcos [Wed, 11 Jan 2023 14:59:19 +0000 (15:59 +0100)] 
Cleanup ipcipher.hh

3 years agodnsdist: Merge the 'main' and 'client' DoH threads 12386/head
Remi Gacogne [Sat, 2 Jul 2022 14:09:56 +0000 (16:09 +0200)] 
dnsdist: Merge the 'main' and 'client' DoH threads

When we are in "single acceptor thread" mode, merge the 'main' and
'client' DoH threads into a single one. We use separate threads to
reduce the separate the handling of the HTTP/2 traffic from the DNS
handling, to reduce latency, but that does not really make sense on
small devices with a single, limited CPU core. On these we prefer
using as few threads as possible to reduce the context switches and
the memory usage.

3 years agodnsdist: Remove ttlCapTypes from the internal state 12384/head
Remi Gacogne [Fri, 2 Dec 2022 14:29:45 +0000 (15:29 +0100)] 
dnsdist: Remove ttlCapTypes from the internal state