Pull request: 2875 fix client filtering settings

Merge in DNS/adguard-home from 2875-client-filtering to master

Updates .

Squashed commit of the following:

commit b3b9582b7dde826005ba79d499ed7e82af067e93
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon May 24 14:22:29 2021 +0300

    all: use atomic, log changes

commit 9304d8b96d0d064d7741c85165ab885f5547fd4c
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon May 24 13:43:22 2021 +0300

    all: fix client filtering settings
This commit is contained in:
Eugene Burkov 2021-05-24 14:48:42 +03:00
parent 52e6a63d8c
commit 14250821ab
9 changed files with 57 additions and 20 deletions
internal/home

View file

@ -307,7 +307,6 @@ func applyAdditionalFiltering(clientAddr net.IP, clientID string, setts *filteri
setts.ClientName = c.Name
setts.ClientTags = c.Tags
if !c.UseOwnSettings {
return
}
@ -319,14 +318,14 @@ func applyAdditionalFiltering(clientAddr net.IP, clientID string, setts *filteri
}
func startDNSServer() error {
config.Lock()
defer config.Unlock()
config.RLock()
defer config.RUnlock()
if isRunning() {
return fmt.Errorf("unable to start forwarding DNS server: Already running")
}
enableFilters(false)
enableFiltersLocked(false)
Context.clients.Start()