Improve CNAME behavior of pi.hole#2585
Merged
Merged
Conversation
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR improves the handling of the special hostname pi.hole within CNAME resolution chains to ensure proper interface-dependent IP address resolution for both IPv4 and IPv6 queries.
- Adds logic to detect when
pi.holeappears in CNAME chains and updates cache records with current interface addresses - Enhances dnsmasq configuration to include both IPv4 and IPv6 host records for
pi.hole - Adds comprehensive test coverage for CNAME chain behavior with
pi.hole
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/dnsmasq_interface.c | Implements cache record updating logic for pi.hole in CNAME chains |
| src/config/dnsmasq_config.c | Updates host record configuration to include IPv6 address |
| test/pihole.toml | Adds test CNAME record and resets custom IP configurations |
| test/test_suite.bats | Adds test cases for CNAME chain behavior and updates expected config count |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dominik <DL6ER@users.noreply.github.com>
yubiuser
approved these changes
Jul 26, 2025
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.
What does this implement/fix?
This PR improves the behavior of the special hostname
pi.holewhen encountered throughout deep CNAME inspection. This ensures that any defined custom CNAME rules that eventually end up inpi.holeget the correct interface-dependent IP addresses both for IPv4 (A) and IPv6 (AAAA).Related issue or feature (if applicable): Fixes #2581
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase)Checklist:
developmentbranch.