Skip to content

ddclient spams cloudflare (and maybe other providers) #481

@Saturn49

Description

@Saturn49

It seems the (somewhat incomplete) conversion from "use" to "usev4" and "usev6" has left some providers spamming on every update instead of using the cache to prevent updating.

The issue stems from the use of 'status', 'status-v4', and 'status-v6'.

nic_cloudflare_update(), for instance, never sets the 'status' key, so it is left as 'no-connect'. However, this variable is checked in nic_updateable(), because $use cannot be set to 'disabled' - the parser doesn't allow it. The result is that even if a cloudflare update was successful last time, it is updated again because 'status' was left at no-connect.

I have a patch that works for my usage, by simply adding

                    if($ipv == "4") {
                        $config{$domain}{"ip"} = $ip;
                        $config{$domain}{"status"} = 'good';
                    }

inside the

if ($response && $response->{result}) {
    success("updating %s: IPv$ipv address set to %s", $domain, $ip);

block. However, I found this pattern elsewhere (freedns and hetzner).

So I'd like to ask the regular contributers, what is the contract for the update functions during this transition to supporting ipv6? Should every update function be setting 'status-ipv4' and 'status'? Or maybe there's a better, more centralized place to combine these?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp-wantedThere are no concrete plans to implement this but PRs are welcome.providerAdds, fixes or removes a provider.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions