AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

$dnsrewrite PTR rule returns duplicate answers when the hostname contains a repeated substring (10.10.10.10.in-addr.arpa)

Open tianlan-dev opened this issue 1 month ago • 1 comments

Prerequisites

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 @ -x 10.10.10.10

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.

Image

tianlan-dev avatar Oct 30 '26 01:10 tianlan-dev

Thank you for letting us know. The information has been forwarded to the dev team.

sofvaskina avatar Oct 30 '26 10:10 sofvaskina