wgengine/tsdns: fix error response marshaling, improve bad query logs
Updates #995 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
554a20becb
commit
741c513e51
@@ -748,3 +748,13 @@ func BenchmarkFull(b *testing.B) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestMarshalResponseFormatError(t *testing.T) {
|
||||
resp := new(response)
|
||||
resp.Header.RCode = dns.RCodeFormatError
|
||||
v, err := marshalResponse(resp)
|
||||
if err != nil {
|
||||
t.Errorf("marshal error: %v", err)
|
||||
}
|
||||
t.Logf("response: %q", v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user