mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
plugin/kubernetes: Only answer transfer requests for authoritative zones (#4802)
* check for zone match Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -18,6 +18,10 @@ import (
|
||||
|
||||
// Transfer implements the transfer.Transfer interface.
|
||||
func (k *Kubernetes) Transfer(zone string, serial uint32) (<-chan []dns.RR, error) {
|
||||
match := plugin.Zones(k.Zones).Matches(zone)
|
||||
if match == "" {
|
||||
return nil, transfer.ErrNotAuthoritative
|
||||
}
|
||||
// state is not used here, hence the empty request.Request{]
|
||||
soa, err := plugin.SOA(context.TODO(), k, zone, request.Request{}, plugin.Options{})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user