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 { func hasAAAAQuestion(msg *dns.Msg) bool {
for _, question := range msg.Question { return msg.Question[0].Qtype == dns.TypeAAAA
if question.Qtype == dns.TypeAAAA {
return true
}
}
return false
} }
func hasAAAAAnswer(msg *dns.Msg) bool { func hasAAAAAnswer(msg *dns.Msg) bool {