mirror of
https://github.com/coredns/coredns.git
synced 2026-07-11 10:10:10 -04:00
plugin/transfer: Fix panic in CoreDNS transfer plugin caused by empty DNS record (#8207)
This PR fixes panic in CoreDNS transfer plugin caused by empty DNS record. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -128,6 +128,9 @@ func (t *Transfer) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Ms
|
||||
batchSize := 0
|
||||
var soa *dns.SOA
|
||||
for records := range pchan {
|
||||
if len(records) == 0 {
|
||||
continue
|
||||
}
|
||||
if x, ok := records[0].(*dns.SOA); ok && soa == nil {
|
||||
soa = x
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user