Commit 9f8bce28 authored by Frank Denis's avatar Frank Denis

Fix forwarding of subdomains

parent f35357ef
......@@ -10,4 +10,3 @@
## be set to that file name in the main configuration file.
example.com 9.9.9.9,8.8.8.8
......@@ -84,7 +84,7 @@ func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) erro
if candidateLen > questionLen {
continue
}
if question[questionLen-candidateLen:] == candidate.domain && (candidateLen == questionLen || (question[questionLen-candidateLen] == '.')) {
if question[questionLen-candidateLen:] == candidate.domain && (candidateLen == questionLen || (question[questionLen-candidateLen-1] == '.')) {
servers = candidate.servers
break
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment