diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c9ccdcf..dfeae3b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,12 @@ and this project adheres to - Support for plain (unencrypted) HTTP/2 ([#4930]). This is useful for AdGuard Home installations behind a reverse proxy. +### Fixed + +- Incorrect path template in DDR responses ([#4927]). + [#2993]: https://github.com/AdguardTeam/AdGuardHome/issues/2993 +[#4927]: https://github.com/AdguardTeam/AdGuardHome/issues/4927 [#4930]: https://github.com/AdguardTeam/AdGuardHome/issues/4930 diff --git a/internal/dnsforward/dns.go b/internal/dnsforward/dns.go index 3f5642e9..947625e3 100644 --- a/internal/dnsforward/dns.go +++ b/internal/dnsforward/dns.go @@ -296,7 +296,7 @@ func (s *Server) makeDDRResponse(req *dns.Msg) (resp *dns.Msg) { values := []dns.SVCBKeyValue{ &dns.SVCBAlpn{Alpn: []string{"h2"}}, &dns.SVCBPort{Port: uint16(addr.Port)}, - &dns.SVCBDoHPath{Template: "/dns-query?dns"}, + &dns.SVCBDoHPath{Template: "/dns-query{?dns}"}, } ans := &dns.SVCB{ diff --git a/internal/dnsforward/dns_test.go b/internal/dnsforward/dns_test.go index ebdc716c..da7c8ae6 100644 --- a/internal/dnsforward/dns_test.go +++ b/internal/dnsforward/dns_test.go @@ -26,7 +26,7 @@ func TestServer_ProcessDDRQuery(t *testing.T) { Value: []dns.SVCBKeyValue{ &dns.SVCBAlpn{Alpn: []string{"h2"}}, &dns.SVCBPort{Port: 8044}, - &dns.SVCBDoHPath{Template: "/dns-query?dns"}, + &dns.SVCBDoHPath{Template: "/dns-query{?dns}"}, }, }