From 5647bc1fc9de2ac534ca6b6bbc48caf7f3561b5a Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Thu, 6 Jun 2019 21:04:17 +0300 Subject: [PATCH] Fix #727 - apply client settings properly --- dns.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/dns.go b/dns.go index 2f41948b..f41a5e7c 100644 --- a/dns.go +++ b/dns.go @@ -221,18 +221,10 @@ func applyClientSettings(clientAddr string, setts *dnsfilter.RequestFilteringSet } log.Debug("Using settings for client with IP %s", clientAddr) - if !c.FilteringEnabled { - setts.FilteringEnabled = false - } - if !c.SafeSearchEnabled { - setts.SafeSearchEnabled = false - } - if !c.SafeBrowsingEnabled { - setts.SafeBrowsingEnabled = false - } - if !c.ParentalEnabled { - setts.ParentalEnabled = false - } + setts.FilteringEnabled = c.FilteringEnabled + setts.SafeSearchEnabled = c.SafeSearchEnabled + setts.SafeBrowsingEnabled = c.SafeBrowsingEnabled + setts.ParentalEnabled = c.UseOwnSettings } func startDNSServer() error {