Skip to content

Conversation

elenril
Copy link
Contributor

@elenril elenril commented Jul 9, 2025

Short description

The LUA preoutquery() hook can now modify dq.remoteaddr to override the remote server to query.

Fixes #6798

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@omoerbeek omoerbeek added this to the rec-5.4.0 milestone Jul 9, 2025
@coveralls
Copy link

coveralls commented Jul 9, 2025

Pull Request Test Coverage Report for Build 17795654203

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • 18 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.03%) to 66.037%

Files with Coverage Reduction New Missed Lines %
pdns/recursordist/syncres.cc 1 81.25%
modules/godbcbackend/sodbc.cc 2 70.13%
pdns/recursordist/rec-main.cc 2 64.68%
pdns/rcpgenerator.cc 3 90.56%
pdns/dnsdistdist/dnsdist-lbpolicies.cc 4 72.36%
pdns/recursordist/pdns_recursor.cc 6 73.64%
Totals Coverage Status
Change from base Build 17789672259: 0.03%
Covered Lines: 128910
Relevant Lines: 166497

💛 - Coveralls

@omoerbeek
Copy link
Member

Please have some patience. We are certainly considering this, but first we need to finish the 5.3.0 release.

@elenril
Copy link
Contributor Author

elenril commented Aug 27, 2025 via email

elenril and others added 2 commits September 17, 2025 09:19
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
@omoerbeek omoerbeek force-pushed the preoutquery_override_remote branch from b884bcc to 1037335 Compare September 17, 2025 11:10
@omoerbeek
Copy link
Member

omoerbeek commented Sep 17, 2025

I rebased the code and added a fix for when the new remote is TCP and port 853, it should switch to DoT if needed.
This PR will need a test.

@omoerbeek
Copy link
Member

As I suspected, there's an issue with the nsspeed bookkeeping: the original IP stays in the table at 0ms, while the updated IP gets an entry > 0ms. The speed based selection mechanism then keeps selecting the fast 0ms entry, which is never updated, basically breaking the mechanism that selects the fastest nameserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rec: Allow changing the destination address of the outgoing query in preoutquery
3 participants