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:
parent
002b748ccd
commit
a6a7e73813
2 changed files with 50 additions and 1 deletions
|
@ -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 != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue