Chore: return empty record in SVCB/HTTPSSVC on fake-ip mode

This commit is contained in:
Dreamacro
2020-10-13 00:15:49 +08:00
parent d3b14c325f
commit bc52f8e4fd
4 changed files with 40 additions and 39 deletions

View File

@ -142,3 +142,14 @@ func transform(servers []NameServer, resolver *Resolver) []dnsClient {
}
return ret
}
func handleMsgWithEmptyAnswer(r *D.Msg) *D.Msg {
msg := &D.Msg{}
msg.Answer = []D.RR{}
msg.SetRcode(r, D.RcodeSuccess)
msg.Authoritative = true
msg.RecursionAvailable = true
return msg
}