diff --git a/documentation/providers/inwx.md b/documentation/providers/inwx.md index 036a77ede..ceb29671a 100644 --- a/documentation/providers/inwx.md +++ b/documentation/providers/inwx.md @@ -109,9 +109,3 @@ D("example.com", REG_INWX, DnsProvider(DSP_CF), ); ``` {% endcode %} - -{% hint style="info" %} -**NOTE**: The INWX provider implementation currently only supports up to 2,147,483,647 domains. If you exceed -this limit, it is expected that DNSControl will fail to recognize some domains. Should you exceed this -limit, please [open an issue on GitHub](https://github.com/StackExchange/dnscontrol/issues/new/choose). -{% endhint %} diff --git a/providers/inwx/inwxProvider.go b/providers/inwx/inwxProvider.go index a00a60b03..0c4cfdaf8 100644 --- a/providers/inwx/inwxProvider.go +++ b/providers/inwx/inwxProvider.go @@ -395,18 +395,24 @@ func (api *inwxAPI) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models. // fetchNameserverDomains returns the domains configured in INWX nameservers func (api *inwxAPI) fetchNameserverDomains() error { + zones := map[string]int{} request := &goinwx.NameserverListRequest{} - request.PageLimit = 2147483647 // int32 max value, highest number API accepts - info, err := api.client.Nameservers.ListWithParams(request) - if err != nil { - return err + page := 1 + for { + request.Page = page + info, err := api.client.Nameservers.ListWithParams(request) + if err != nil { + return err + } + for _, domain := range info.Domains { + zones[domain.Domain] = domain.RoID + } + if len(zones) >= info.Count { + break + } + page++ } - - api.domainIndex = map[string]int{} - for _, domain := range info.Domains { - api.domainIndex[domain.Domain] = domain.RoID - } - + api.domainIndex = zones return nil }