DynDNS2: Set ipv6 argument
This commit is contained in:
parent
b628eeb65a
commit
aea03be92f
1 changed files with 18 additions and 5 deletions
23
ddclient
23
ddclient
|
|
@ -2556,11 +2556,11 @@ sub group_hosts_by {
|
|||
|
||||
my %groups = ();
|
||||
foreach my $h (@$hosts) {
|
||||
my @keys = (@$attributes, 'wantip');
|
||||
map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys;
|
||||
my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys);
|
||||
my @keys = (@$attributes, 'wantip');
|
||||
map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys;
|
||||
my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys);
|
||||
|
||||
push @{$groups{$sig}}, $h;
|
||||
push @{$groups{$sig}}, $h;
|
||||
}
|
||||
return %groups;
|
||||
}
|
||||
|
|
@ -3015,13 +3015,21 @@ sub nic_dyndns2_update {
|
|||
my $hosts = join(',', @hosts);
|
||||
my $h = $hosts[0];
|
||||
my $ip = $config{$h}{'wantip'};
|
||||
my $ipv6 = $config{$h}{'wantipv6'};
|
||||
delete $config{$_}{'wantip'} foreach @hosts;
|
||||
delete $config{$_}{'wantipv6'} foreach @hosts;
|
||||
|
||||
info("setting IP address to %s for %s", $ip, $hosts);
|
||||
verbose("UPDATE:","updating %s", $hosts);
|
||||
|
||||
my $prot = "http";
|
||||
my $use_ssl;
|
||||
if ($use_ssl || $globals{'ssl'}) {
|
||||
$prot = "https";
|
||||
}
|
||||
|
||||
## Select the DynDNS system to update
|
||||
my $url = "http://$config{$h}{'server'}$config{$h}{'script'}?system=";
|
||||
my $url = "$prot://$config{$h}{'server'}$config{$h}{'script'}?system=";
|
||||
if ($config{$h}{'custom'}) {
|
||||
warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts)
|
||||
if $config{$h}{'static'};
|
||||
|
|
@ -3042,6 +3050,11 @@ sub nic_dyndns2_update {
|
|||
$url .= "&myip=";
|
||||
$url .= $ip if $ip;
|
||||
|
||||
if ($ipv6) {
|
||||
$url .= "&myipv6=";
|
||||
$url .= $ipv6;
|
||||
}
|
||||
|
||||
## some args are not valid for a custom domain.
|
||||
$url .= "&wildcard=ON" if ynu($config{$h}{'wildcard'}, 1, 0, 0);
|
||||
if ($config{$h}{'mx'}) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue