diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e3a35c7..3fdf434a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ and this project adheres to ### Fixed +- Inability to set DNS cache TTL limits ([#2459]). - Possible freezes on slower machines ([#2225]). - A mitigation against records being shown in the wrong order on the query log page ([#2293]). @@ -68,6 +69,7 @@ and this project adheres to [#2293]: https://github.com/AdguardTeam/AdGuardHome/issues/2293 [#2345]: https://github.com/AdguardTeam/AdGuardHome/issues/2345 [#2355]: https://github.com/AdguardTeam/AdGuardHome/issues/2355 +[#2459]: https://github.com/AdguardTeam/AdGuardHome/issues/2459 ### Removed diff --git a/internal/dnsforward/http.go b/internal/dnsforward/http.go index c6c33c4e..e24ba89e 100644 --- a/internal/dnsforward/http.go +++ b/internal/dnsforward/http.go @@ -167,11 +167,12 @@ func (req *dnsConfig) checkCacheTTL() bool { if req.CacheMinTTL == nil && req.CacheMaxTTL == nil { return true } + var min, max uint32 if req.CacheMinTTL != nil { min = *req.CacheMinTTL } - if req.CacheMaxTTL == nil { + if req.CacheMaxTTL != nil { max = *req.CacheMaxTTL } diff --git a/internal/dnsforward/msg.go b/internal/dnsforward/msg.go index 3c381704..2e72c40c 100644 --- a/internal/dnsforward/msg.go +++ b/internal/dnsforward/msg.go @@ -42,7 +42,6 @@ func (s *Server) genDNSFilterMessage(d *proxy.DNSContext, result *dnsfilter.Resu if result.Reason == dnsfilter.FilteredSafeSearch && len(result.Rules) > 0 && result.Rules[0].IP != nil { - return s.genResponseWithIP(m, result.Rules[0].IP) }