$dnsrewrite PTR rule returns duplicate answers when the hostname contains a repeated substring (10.10.10.10.in-addr.arpa)
Prerequisites
-
[x] I have checked the Wiki and Discussions and found no answer
-
[x] I have searched other issues and found no duplicates
-
[x] I want to report a bug and not ask a question or ask for help
-
[x] I have set up AdGuard Home correctly and configured clients to use it. (Use the Discussions for help with installing and configuring clients.)
Platform (OS and CPU architecture)
Darwin (aka macOS), ARM64
Installation
GitHub releases or script from README
Setup
On one machine
AdGuard Home version
0.107.79
Action
AdGuard Home version: v0.107.79 (reproduced on two instances: macOS binary and Home Assistant add-on)
Custom filtering rule (present exactly once; DNS rewrites list is empty and disabled):
||10.10.10.10.in-addr.arpa^$dnsrewrite=NOERROR;PTR;router.home.arpa.
Steps to reproduce
Add the rule above to Custom filtering rules.
dig @
Expected result
one PTR answer.
Actual result
the same PTR record is returned three times:
10.10.10.10.in-addr.arpa. 10 IN PTR router.home.arpa. 10.10.10.10.in-addr.arpa. 10 IN PTR router.home.arpa. 10.10.10.10.in-addr.arpa. 10 IN PTR router.home.arpa.
Additional information and/or screenshots
"Check the filtering" for 10.10.10.10.in-addr.arpa also lists the same custom rule three times (screenshot attached).
Notes: About 25 other PTR rules of the same form in the same list (e.g. ||100.10.10.10.in-addr.arpa^, ||254.10.10.10.in-addr.arpa^) return a single answer. Querying a subdomain (x.10.10.10.10.in-addr.arpa) also returns three answers. The count matches the number of times 10.10 occurs in 10.10.10.10, so the same rule may be collected once per shortcut match and not deduplicated before building the $dnsrewrite response.
Thank you for letting us know. The information has been forwarded to the dev team.