Pull request 1812: AG-21286
Merge in DNS/adguard-home from AG-21286 to master Squashed commit of the following: commit 587b4a3704fd63aa3da6c1be83f8a49bf4e27b00 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Apr 11 14:15:05 2023 +0300 all: fix negative pause duration
This commit is contained in:
@@ -101,7 +101,7 @@ type jsonDNSConfig struct {
|
||||
}
|
||||
|
||||
func (s *Server) getDNSConfig() (c *jsonDNSConfig) {
|
||||
protectionEnabled := s.UpdatedProtectionStatus()
|
||||
protectionEnabled, protectionDisabledUntil := s.UpdatedProtectionStatus()
|
||||
|
||||
s.serverLock.RLock()
|
||||
defer s.serverLock.RUnlock()
|
||||
@@ -128,12 +128,6 @@ func (s *Server) getDNSConfig() (c *jsonDNSConfig) {
|
||||
usePrivateRDNS := s.conf.UsePrivateRDNS
|
||||
localPTRUpstreams := stringutil.CloneSliceOrEmpty(s.conf.LocalPTRResolvers)
|
||||
|
||||
var disabledUntil *time.Time
|
||||
if s.conf.ProtectionDisabledUntil != nil {
|
||||
t := *s.conf.ProtectionDisabledUntil
|
||||
disabledUntil = &t
|
||||
}
|
||||
|
||||
var upstreamMode string
|
||||
if s.conf.FastestAddr {
|
||||
upstreamMode = "fastest_addr"
|
||||
@@ -169,7 +163,7 @@ func (s *Server) getDNSConfig() (c *jsonDNSConfig) {
|
||||
UsePrivateRDNS: &usePrivateRDNS,
|
||||
LocalPTRUpstreams: &localPTRUpstreams,
|
||||
DefaultLocalPTRUpstreams: defLocalPTRUps,
|
||||
DisabledUntil: disabledUntil,
|
||||
DisabledUntil: protectionDisabledUntil,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user