Skip to content

Commit

Permalink
pdns: fix usage of notify only when zone kind is Master or Slave (go-…
Browse files Browse the repository at this point in the history
  • Loading branch information
melck committed Dec 7, 2022
1 parent c754882 commit 74209d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions providers/dns/pdns/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type hostedZone struct {
ID string `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
Kind string `json:"kind"`
RRSets []rrSet `json:"rrsets"`

// pre-v1 API
Expand Down
4 changes: 2 additions & 2 deletions providers/dns/pdns/pdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
return fmt.Errorf("pdns: %w", err)
}

if d.apiVersion < 1 {
if d.apiVersion < 1 || (zone.Kind != "Master" && zone.Kind != "Slave") {
return nil
}

Expand Down Expand Up @@ -221,7 +221,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
return fmt.Errorf("pdns: %w", err)
}

if d.apiVersion < 1 {
if d.apiVersion < 1 || (zone.Kind != "Master" && zone.Kind != "Slave") {
return nil
}

Expand Down

0 comments on commit 74209d0

Please sign in to comment.