plugin/kubernetes: fix AXFR panic when nsAddrs returns multiple records (#8256)

This commit is contained in:
Pavel Lazureykis
2026-07-09 04:45:30 -04:00
committed by GitHub
parent 9bf5de8e92
commit 7df9238255
2 changed files with 69 additions and 10 deletions

View File

@@ -47,17 +47,17 @@ func (k *Kubernetes) Transfer(zone string, serial uint32) (<-chan []dns.RR, erro
nsHosts[nsHost] = struct{}{}
ch <- []dns.RR{&dns.NS{Hdr: dns.RR_Header{Name: zone, Rrtype: dns.TypeNS, Class: dns.ClassINET, Ttl: k.ttl}, Ns: nsHost}}
}
ch <- nsAddrs
if !k.isMultiClusterZone(zone) {
k.transferServices(ch, zonePath)
} else {
k.transferMultiClusterServices(ch, zonePath)
}
ch <- soa
close(ch)
}
ch <- nsAddrs
if !k.isMultiClusterZone(zone) {
k.transferServices(ch, zonePath)
} else {
k.transferMultiClusterServices(ch, zonePath)
}
ch <- soa
close(ch)
}()
return ch, nil
}