From 537bdacec88f16ab1d6d6cc3748d39df00976dea Mon Sep 17 00:00:00 2001 From: Dimitry Kolyshev Date: Thu, 4 Jul 2024 12:10:30 +0300 Subject: [PATCH] all: upd dnsproxy --- go.mod | 8 ++++++-- go.sum | 9 +++++---- internal/dnsforward/process.go | 5 ++++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 569e7bc4..f36a1ff1 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,9 @@ module github.com/AdguardTeam/AdGuardHome go 1.22.5 require ( - github.com/AdguardTeam/dnsproxy v0.71.2 - github.com/AdguardTeam/golibs v0.24.0 + // TODO(d.kolyshev): Use a tagged version once released. + github.com/AdguardTeam/dnsproxy v0.71.3-0.20240703130953-eef7afb408d8 + github.com/AdguardTeam/golibs v0.24.1 github.com/AdguardTeam/urlfilter v0.19.0 github.com/NYTimes/gziphandler v1.1.1 github.com/ameshkov/dnscrypt/v2 v2.3.0 @@ -49,6 +50,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/pprof v0.0.0-20240521024322-9665fa269a30 // indirect + github.com/jessevdk/go-flags v1.5.0 // indirect github.com/mdlayher/socket v0.5.1 // indirect github.com/onsi/ginkgo/v2 v2.17.3 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect @@ -64,3 +66,5 @@ require ( golang.org/x/tools v0.22.0 // indirect gonum.org/v1/gonum v0.15.0 // indirect ) + +replace github.com/AdguardTeam/dnsproxy => ../dnsproxy diff --git a/go.sum b/go.sum index b3f06967..dd45ab61 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ -github.com/AdguardTeam/dnsproxy v0.71.2 h1:dFG2wga4GDdj1eI3rU2wqjQ6QGQm9MjLRb5ZzyH3Vgg= -github.com/AdguardTeam/dnsproxy v0.71.2/go.mod h1:huI5zyWhlimHBhg0jt2CMinXzsEHymI+WlvxIfmfEGA= -github.com/AdguardTeam/golibs v0.24.0 h1:qAnOq7BQtwSVo7Co9q703/n+nZ2Ap6smkugU9G9MomY= -github.com/AdguardTeam/golibs v0.24.0/go.mod h1:9/vJcYznW7RlmCT/Qzi8XNZGj+ZbWfHZJmEXKnRpCAU= +github.com/AdguardTeam/golibs v0.24.1 h1:/ulkfm65wi33p72ybxiOt3lSdP0nr1GggSoaT4sHbns= +github.com/AdguardTeam/golibs v0.24.1/go.mod h1:9/vJcYznW7RlmCT/Qzi8XNZGj+ZbWfHZJmEXKnRpCAU= github.com/AdguardTeam/urlfilter v0.19.0 h1:q7eH13+yNETlpD/VD3u5rLQOripcUdEktqZFy+KiQLk= github.com/AdguardTeam/urlfilter v0.19.0/go.mod h1:+N54ZvxqXYLnXuvpaUhK2exDQW+djZBRSb6F6j0rkBY= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= @@ -56,6 +54,8 @@ github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Go github.com/insomniacslk/dhcp v0.0.0-20240419123447-f1cffa2c0c49 h1:/OuvSMGT9+xnyZ+7MZQ1zdngaCCAdPoSw8B/uurZ7pg= github.com/insomniacslk/dhcp v0.0.0-20240419123447-f1cffa2c0c49/go.mod h1:KclMyHxX06VrVr0DJmeFSUb1ankt7xTfoOA35pCkoic= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/josharian/native v1.0.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86 h1:elKwZS1OcdQ0WwEDBeqxKwb7WB62QX8bvZ/FJnVXIfk= github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86/go.mod h1:aFAMtuldEgx/4q7iSGazk22+IcgvtiC+HIimFO9XlS8= @@ -155,6 +155,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.1-0.20230131160137-e7d7f63158de/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/internal/dnsforward/process.go b/internal/dnsforward/process.go index 8c66ccf9..bd556989 100644 --- a/internal/dnsforward/process.go +++ b/internal/dnsforward/process.go @@ -145,6 +145,9 @@ const mozillaFQDN = "use-application-dns.net." // [Section 6.2 of RFC 6761]: https://www.rfc-editor.org/rfc/rfc6761.html#section-6.2 const healthcheckFQDN = "healthcheck.adguardhome.test." +// retryNoError is a retry time for NoError SOA. +const retryNoError = 60 + // processInitial terminates the following processing for some requests if // needed and enriches dctx with some client-specific information. // @@ -159,7 +162,7 @@ func (s *Server) processInitial(dctx *dnsContext) (rc resultCode) { q := pctx.Req.Question[0] qt := q.Qtype if s.conf.AAAADisabled && qt == dns.TypeAAAA { - _ = proxy.CheckDisabledAAAARequest(pctx, true) + pctx.Res = proxy.GenEmptyMessage(pctx.Req, dns.RcodeSuccess, retryNoError) return resultCodeFinish }