dnsdist: add backend redirections (EDSR) - #17828
Open
esensar wants to merge 1 commit into
Open
Conversation
This implements [EDSR][EDSR] for backends. This applies both to encrypted backends and ones that were upgraded with `autoUpgrade` flag. [EDSR]: https://datatracker.ietf.org/doc/draft-ietf-add-encrypted-dns-server-redirection/00/ Signed-off-by: Ensar Sarajčić <dev@ensarsarajcic.com>
esensar
commented
Jul 31, 2026
Comment on lines
+106
to
+124
| bool d_enableRedirect; | ||
| std::string d_poolAfterRedirect; | ||
| uint32_t d_redirectInterval; | ||
| uint16_t d_redirectDohKey; | ||
| bool d_keepAfterRedirect; | ||
| uint32_t d_redirectMaxFollowCount; | ||
| }; | ||
|
|
||
| static bool getDiscoveredConfig(const Logr::Logger& logger, const UpgradeableBackend& backend, DiscoveredResolverConfig& config); | ||
| static bool tryToUpgradeBackend(const Logr::Logger& logger, const UpgradeableBackend& backend); | ||
| struct RedirectableBackend | ||
| { | ||
| std::shared_ptr<DownstreamState> d_origDs; | ||
| std::shared_ptr<DownstreamState> d_currentDs; | ||
| std::string d_poolAfterRedirect; | ||
| time_t d_nextCheck; | ||
| uint32_t d_interval; | ||
| uint16_t d_dohKey; | ||
| bool d_keepAfterRedirect; | ||
| uint32_t d_maxFollowCount; | ||
| }; |
Contributor
Author
There was a problem hiding this comment.
There are many duplicated fields here, because redirection pairs well with upgrade (starting off from unencrypted backend, upgrading to encrypted and then using that encrypted channel to choose a more suitable backend) - would it make more sense to combine these structs and just add a flag to mark backends picked for redirection?
Coverage Report for CI Build 30616844269Coverage increased (+11.7%) to 71.167%Details
Uncovered Changes
Coverage Regressions22355 previously-covered lines in 299 files lost coverage.
Coverage Stats💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
This implements EDSR (draft) for backends. This applies both to encrypted backends and ones that were upgraded with
autoUpgradeflag. This allows the backends to advertise preferable alternative backends, using the same mechanism as DDR (autoUpgrade), but only via encrypted channels.Checklist
I have: