Support IPv6 for CloudFlare
This makes the Cloudflare support IPv6-aware. Ideally, A and AAAA records would be updated in one shot, as CloudFlare has a 5 minute throttling limit for API calls that change records. Merge pull request #56 from d235j/cloudflare-ipv6
This commit is contained in:
commit
ec2acfb1f3
1 changed files with 5 additions and 1 deletions
6
ddclient
6
ddclient
|
@ -4288,7 +4288,11 @@ sub nic_cloudflare_update {
|
||||||
|
|
||||||
# Get DNS record ID
|
# Get DNS record ID
|
||||||
$url = "https://$config{$key}{'server'}/zones/$zone_id/dns_records?";
|
$url = "https://$config{$key}{'server'}/zones/$zone_id/dns_records?";
|
||||||
$url .= "type=A&name=$domain";
|
if (is_ipv6($ip)) {
|
||||||
|
$url .= "type=AAAA&name=$domain";
|
||||||
|
} else {
|
||||||
|
$url .= "type=A&name=$domain";
|
||||||
|
}
|
||||||
|
|
||||||
$reply = geturl(opt('proxy'), $url, undef, undef, $headers);
|
$reply = geturl(opt('proxy'), $url, undef, undef, $headers);
|
||||||
unless ($reply) {
|
unless ($reply) {
|
||||||
|
|
Loading…
Reference in a new issue