Pull request 1987: 6158-fix-dns-filter
Updates #6158. Squashed commit of the following: commit 763292f9cf5796574b4b79fc32874fb9acefb500 Author: Stanislav Chzhen <s.chzhen@adguard.com> Date: Thu Aug 31 12:54:08 2023 +0300 dnsforward: fix dns filter
This commit is contained in:
parent
18d15be4e8
commit
27ec6cd59e
|
@ -542,13 +542,16 @@ func (s *Server) setupLocalResolvers() (err error) {
|
||||||
func (s *Server) Prepare(conf *ServerConfig) (err error) {
|
func (s *Server) Prepare(conf *ServerConfig) (err error) {
|
||||||
s.conf = *conf
|
s.conf = *conf
|
||||||
|
|
||||||
err = validateBlockingMode(
|
// dnsFilter can be nil during application update.
|
||||||
s.dnsFilter.BlockingMode,
|
if s.dnsFilter != nil {
|
||||||
s.dnsFilter.BlockingIPv4,
|
err = validateBlockingMode(
|
||||||
s.dnsFilter.BlockingIPv6,
|
s.dnsFilter.BlockingMode,
|
||||||
)
|
s.dnsFilter.BlockingIPv4,
|
||||||
if err != nil {
|
s.dnsFilter.BlockingIPv6,
|
||||||
return fmt.Errorf("checking blocking mode: %w", err)
|
)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("checking blocking mode: %w", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s.initDefaultSettings()
|
s.initDefaultSettings()
|
||||||
|
|
Loading…
Reference in New Issue