mirror of
https://github.com/coredns/coredns.git
synced 2025-12-06 02:15:11 -05:00
do not log NOERROR in log plugin when response is not available (#4725)
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
This commit is contained in:
@@ -86,7 +86,7 @@ func appendValue(b []byte, state request.Request, rr *dnstest.Recorder, label st
|
||||
return strconv.AppendInt(b, int64(state.Size()), 10)
|
||||
// Recorded replacements.
|
||||
case "{rcode}":
|
||||
if rr == nil {
|
||||
if rr == nil || rr.Msg == nil {
|
||||
return append(b, EmptyValue...)
|
||||
}
|
||||
if rcode := dns.RcodeToString[rr.Rcode]; rcode != "" {
|
||||
|
||||
Reference in New Issue
Block a user