Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$dnsrewrite appends answer twice #2981

Closed
EugeneOne1 opened this issue Apr 19, 2021 · 2 comments
Closed

$dnsrewrite appends answer twice #2981

EugeneOne1 opened this issue Apr 19, 2021 · 2 comments
Assignees
Milestone

Comments

@EugeneOne1
Copy link
Member

Adding a custom filtering rewrite rule for some PTRs makes AGH respond with a duplicated address.

For example, adding a rule:

||168.192.168.192.in-addr.arpa^$dnsrewrite=noerror;ptr;abc.com

Makes answer's section look like this:

;; ANSWER SECTION:
168.192.168.192.in-addr.arpa. 10 IN	PTR	abc.com.
168.192.168.192.in-addr.arpa. 10 IN	PTR	abc.com.

At the same time, adding rule:

||4.3.2.1.in-addr.arpa^$dnsrewrite=noerror;ptr;henlo.com

Makes answer's section proper again:

;; ANSWER SECTION:
4.3.2.1.in-addr.arpa.	10	IN	PTR	henlo.com.
@EugeneOne1 EugeneOne1 self-assigned this Apr 19, 2021
@EugeneOne1 EugeneOne1 added this to the v0.107.0 milestone Apr 19, 2021
@ameshkov ameshkov modified the milestones: v0.107.0, v0.106.0 Apr 19, 2021
@ameshkov
Copy link
Member

We'd better handle this in v0.106.0 since this is a bug in the functionality we've added rather recently.

@EugeneOne1
Copy link
Member Author

@ameshkov, I'm not really sure if this caused by newly added feature, since we've found some weird code in rewriting logic, which may be related. Needs investigation anyway.

@ameshkov ameshkov changed the title DNSRewrite appends answer twice $dnsrewrite appends answer twice Apr 19, 2021
adguard pushed a commit to AdguardTeam/urlfilter that referenced this issue Apr 26, 2021
Merge in DNS/urlfilter from 2981-fix-dnsrewrite to master

Updates AdguardTeam/AdGuardHome#2981.

Squashed commit of the following:

commit f3ca421
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Apr 26 13:18:19 2021 +0300

    all: imp code, docs

commit 1c58c38
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Apr 23 18:07:13 2021 +0300

    all: fix double answers
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 2981-fix-dnsrewrite to master

Closes AdguardTeam#2981.
Updates AdguardTeam#2923.

Squashed commit of the following:

commit 578754d
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Apr 23 17:07:24 2021 +0300

    all: upd urlfilter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants