diff --git a/dnsfilter/dnsfilter.go b/dnsfilter/dnsfilter.go index 32707aac..adfabd9c 100644 --- a/dnsfilter/dnsfilter.go +++ b/dnsfilter/dnsfilter.go @@ -228,6 +228,8 @@ func (d *Dnsfilter) filtersInitializer() { // Close - close the object func (d *Dnsfilter) Close() { + d.engineLock.Lock() + defer d.engineLock.Unlock() d.reset() } @@ -478,6 +480,7 @@ func createFilteringEngine(filters []Filter) (*filterlist.RuleStorage, *urlfilte // Initialize urlfilter objects func (d *Dnsfilter) initFiltering(allowFilters, blockFilters []Filter) error { d.engineLock.Lock() + defer d.engineLock.Unlock() d.reset() rulesStorage, filteringEngine, err := createFilteringEngine(blockFilters) if err != nil { @@ -491,7 +494,6 @@ func (d *Dnsfilter) initFiltering(allowFilters, blockFilters []Filter) error { d.filteringEngine = filteringEngine d.rulesStorageWhite = rulesStorageWhite d.filteringEngineWhite = filteringEngineWhite - d.engineLock.Unlock() log.Debug("initialized filtering engine") return nil diff --git a/dnsforward/dnsforward.go b/dnsforward/dnsforward.go index 3ddda7f1..c76ccf75 100644 --- a/dnsforward/dnsforward.go +++ b/dnsforward/dnsforward.go @@ -32,9 +32,9 @@ const ( ) var defaultDNS = []string{ - "https://dns.quad9.net/dns-query", + "https://dns10.quad9.net/dns-query", } -var defaultBootstrap = []string{"9.9.9.9", "149.112.112.112"} +var defaultBootstrap = []string{"9.9.9.10", "149.112.112.10", "2620:fe::10", "2620:fe::fe:10"} var webRegistered bool