Simplify hasAAAAQuestion

This commit is contained in:
Frank Denis 2020-09-17 00:24:04 +02:00
parent b02649f774
commit b460ca9fa8
1 changed files with 1 additions and 6 deletions

View File

@ -135,12 +135,7 @@ func (plugin *PluginDNS64) Eval(pluginsState *PluginsState, msg *dns.Msg) error
}
func hasAAAAQuestion(msg *dns.Msg) bool {
for _, question := range msg.Question {
if question.Qtype == dns.TypeAAAA {
return true
}
}
return false
return msg.Question[0].Qtype == dns.TypeAAAA
}
func hasAAAAAnswer(msg *dns.Msg) bool {