Fix #4395, fix out of order messages and fix forward perspective. (#4396)

Signed-off-by: Frank Riley <fhriley@gmail.com>
This commit is contained in:
Frank Riley
2021-01-21 02:00:27 -07:00
committed by GitHub
parent 8b2ff6c388
commit eba74389c4
3 changed files with 24 additions and 14 deletions

View File

@@ -19,18 +19,6 @@ type ResponseWriter struct {
// WriteMsg writes back the response to the client and THEN works on logging the request and response to dnstap.
func (w *ResponseWriter) WriteMsg(resp *dns.Msg) error {
err := w.ResponseWriter.WriteMsg(resp)
q := new(tap.Message)
msg.SetQueryTime(q, w.queryTime)
msg.SetQueryAddress(q, w.RemoteAddr())
if w.IncludeRawMessage {
buf, _ := w.query.Pack()
q.QueryMessage = buf
}
msg.SetType(q, tap.Message_CLIENT_QUERY)
w.TapMessage(q)
if err != nil {
return err
}