Skip to content

Commit 37cb54a

Browse files
committed
dnsx/cacher: fill msg and region from cached summary
1 parent 9aef9ee commit 37cb54a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

intra/dnsx/cacher.go

+6
Original file line numberDiff line numberDiff line change
@@ -482,16 +482,22 @@ func fillSummary(s *x.DNSSummary, other *x.DNSSummary) {
482482
if other.QType == 0 {
483483
other.QType = s.QType
484484
}
485+
// fill in region if empty
486+
if len(other.Region) == 0 {
487+
other.Region = s.Region
488+
}
485489

486490
if len(s.RData) != 0 {
487491
other.RData = s.RData
488492
}
493+
489494
other.RCode = s.RCode
490495
other.RTtl = s.RTtl
491496
other.Server = s.Server
492497
other.RelayServer = s.RelayServer
493498
other.Status = s.Status
494499
other.Blocklists = s.Blocklists
500+
other.Msg = s.Msg
495501
other.UpstreamBlocks = s.UpstreamBlocks
496502
}
497503

0 commit comments

Comments
 (0)