From 15e714350cf7dfa3ed39ff2a02a083fa1f4fa46d Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Tue, 16 Jun 2020 11:47:26 +0300 Subject: [PATCH] fix search by "whitelisted", "rewritten" --- querylog/search_criteria.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/querylog/search_criteria.go b/querylog/search_criteria.go index bc2aa435..3c1ee0de 100644 --- a/querylog/search_criteria.go +++ b/querylog/search_criteria.go @@ -101,7 +101,10 @@ func (c *searchCriteria) match(entry *logEntry) bool { case filteringStatusAll: return true case filteringStatusFiltered: - return res.IsFiltered + return res.IsFiltered || + res.Reason == dnsfilter.NotFilteredWhiteList || + res.Reason == dnsfilter.ReasonRewrite || + res.Reason == dnsfilter.RewriteEtcHosts case filteringStatusBlocked: return res.IsFiltered && (res.Reason == dnsfilter.FilteredBlackList || @@ -111,11 +114,10 @@ func (c *searchCriteria) match(entry *logEntry) bool { case filteringStatusBlockedSafebrowsing: return res.IsFiltered && res.Reason == dnsfilter.FilteredSafeBrowsing case filteringStatusWhitelisted: - return res.IsFiltered && res.Reason == dnsfilter.NotFilteredWhiteList + return res.Reason == dnsfilter.NotFilteredWhiteList case filteringStatusRewritten: - return res.IsFiltered && - (res.Reason == dnsfilter.ReasonRewrite || - res.Reason == dnsfilter.RewriteEtcHosts) + return (res.Reason == dnsfilter.ReasonRewrite || + res.Reason == dnsfilter.RewriteEtcHosts) case filteringStatusSafeSearch: return res.IsFiltered && res.Reason == dnsfilter.FilteredSafeSearch