Merge pull request #44980 from er0k/bad-dns

[23.0] Fix nil pointer dereference when attempting to log DNS errors
This commit is contained in:
Cory Snider 2023-02-14 12:25:20 -05:00 committed by GitHub
commit ecd940a0c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -396,7 +396,7 @@ func (r *resolver) ServeDNS(w dns.ResponseWriter, query *dns.Msg) {
}
if err != nil {
logrus.WithError(err).Errorf("[resolver] failed to handle query: %s (%s) from %s", queryName, dns.TypeToString[queryType], extConn.LocalAddr().String())
logrus.WithError(err).Errorf("[resolver] failed to handle query: %s (%s)", queryName, dns.TypeToString[queryType])
return
}