domeneshop: Add IPv6 support

This commit is contained in:
Richard Hansen 2024-07-19 18:47:48 -04:00
parent 61fff1c344
commit ef8bf634fe
2 changed files with 20 additions and 16 deletions

View file

@ -84,6 +84,8 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
records. [#695](https://github.com/ddclient/ddclient/pull/695)
* `inwx`: New `protocol` option for updating [INWX](https://www.inwx.com/)
records. [#690](https://github.com/ddclient/ddclient/pull/690)
* `domeneshop`: Add IPv6 support.
[#719](https://github.com/ddclient/ddclient/pull/719)
### Bug fixes

View file

@ -4314,8 +4314,9 @@ EoEXAMPLE
sub nic_domeneshop_update {
debug("\nnic_domeneshop_update -------------------");
for my $h (@_) {
my $ip = delete $config{$h}{'wantip'};
info("$h: Setting IP address to $ip");
for my $ipv ('4', '6') {
my $ip = delete $config{$h}{"wantipv$ipv"} or next;
info("$h: Setting IPv$ipv address to $ip");
my $reply = geturl(
proxy => opt('proxy'),
url => "$config{$h}{'server'}/v0/dyndns/update?hostname=$h&myip=$ip",
@ -4327,10 +4328,11 @@ sub nic_domeneshop_update {
next;
}
next if !header_ok($h, $reply);
$config{$h}{'ip'} = $ip;
$config{$h}{"ipv$ipv"} = $ip;
$config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good';
success("$h: IP address set to $ip");
$config{$h}{"status-ipv$ipv"} = 'good';
success("$h: IPv$ipv address set to $ip");
}
}
}