Fix suffix matching so that www.example is rejected if example is filtered

This commit is contained in:
Frank Denis 2018-01-20 13:18:54 +01:00
parent b9e89d2278
commit 475d7edb2a
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ func (plugin *PluginBlockName) Eval(pluginsState *PluginsState, msg *dns.Msg) er
if !reject {
match, _, found := plugin.blockedSuffixes.Root().LongestPrefix([]byte(revQname))
if found {
if len(match) == len(qName) || qName[len(match)] == '.' {
if len(match) == len(qName) || revQname[len(match)] == '.' {
reject, reason = true, "*"+string(match)
}
}