pi-hole / FTL

The Pi-hole FTL engine
https://pi-hole.net
Other
1.34k stars 187 forks source link

Internal name resolution over UDP with fallback to TCP #1986

Closed DL6ER closed 4 weeks ago

DL6ER commented 4 weeks ago

What does this implement/fix?

This is a follow-up PR improving #1976 for edge-cases where upstream servers (can be local routers, especially in the context of conditional forwarding) are not capable to doing DNS over TCP. The PR changes the internal name resolver use UDP by default, but actively detect UDP DNS truncation (commonly seen in conjunction with DNSSEC) and appropriately fall back to TCP for corresponding queries.

Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

rdwebdesign commented 4 weeks ago

Tested using the old (crap) router and it is working as expected. No more connection errors.