When cname itself is found in the cname cache, an exception is thrown directly
- [x] This is not a support question, I have read about opensource and will send support questions to the IRC channel, GitHub Discussions or the mailing list.
- [x] I have read and understood the 'out in the open' support policy
- Program: Recursor
- Issue type: Bug report
Short description
During DNS iterative resolution, when the child of qname goes out of the network to resolve the cname to its own cname, it will return serverfail and continue the subsequent iterative operation. However, when the child cname is found in the cache to its own, **an exception **will be thrown directly and the resolution will end.
Environment
- Operating system: Debian 10
- Software version: recursor 4.9+
- Software source:
Steps to reproduce
When the authority is configured with the domain name as mentioned above, the resolution of A can be resolved normally. When resolving AAAA, it will directly hit the cname into its own cache and then throw an exception.
Expected behaviour
When parsing AAAA, after finding the child cname to itself, it can be iterated normally without throwing an exception.
Actual behaviour
Throws an exception and parses and returns rcode 2
Other information
domain:aruu.new-gtarms-into.cloudinfiniti.com
child domain:new-gtarms-into.cloudinfiniti.com
Authoritative analysis:
Supplement: Since this case is caused by an authoritative configuration error, I think that when the child's cname is found in the cache and it is yourself, an exception should not be thrown directly to end the parsing. You can return severefail and continue the subsequent iterative parsing. Only when the cname of the qname is yourself should an exception be thrown.
Does #14822 and #15396 have any influence on this behaviour? It would be nice to test against a more recent version.
Does #14822 and #15396 have any influence on this behaviour? It would be nice to test against a more recent version.
The problem remains unresolved. My understanding is that the doCNAMECacheCheck function should return rcode 2 for each CNAME returned to itself, rather than throwing an exception, to resolve the issue.