Skip to content

Conversation

hafkensite
Copy link
Contributor

Summary
The DNS resolver now explicitly follows CNAME chains instead of relying on res_search() to handle them transparently. This fixes resolution failures when the DNS cache module is enabled, as cached CNAME responses need to be followed manually to reach the final A/AAAA records.

Details
Fixes issue #3709, recursive CNAME doesn't work when dns_cache module is used.

Solution

Changes:

  • Add iterative CNAME chain following in own_gethostbyname2()
  • Limit chain depth to 10 to prevent infinite loops
  • Add debug logging for CNAME traversal

Compatibility
Nope.

Closing issues

closes #3709

The DNS resolver now explicitly follows CNAME chains instead of relying
on res_search() to handle them transparently. This fixes resolution
failures when the DNS cache module is enabled, as cached CNAME responses
need to be followed manually to reach the final A/AAAA records.

Changes:
- Add iterative CNAME chain following in own_gethostbyname2()
- Limit chain depth to 10 to prevent infinite loops
- Add debug logging for CNAME traversal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] CName resolution breaks when using dns_cache

1 participant