-
Notifications
You must be signed in to change notification settings - Fork 380
Description
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?