Fixed hosts trying to update if IP acquisition failed

This commit is contained in:
Lenard Hess 2023-07-18 20:45:15 +02:00 committed by Reuben Thomas
parent d4db5cbc90
commit 1715bd3a17
2 changed files with 7 additions and 0 deletions

View file

@ -19,6 +19,7 @@ repository history](https://github.com/ddclient/ddclient/commits/master).
* Added support for moving secrets out of the configuration through environment variables
* Extended postscript mechanism
* sample-get-ip-from-fritzbox: Added environment variable to override hostname
* Warn about hosts where no IP could be determined - and skip the (bogus) update.
### Provider updates:
* Added regfish

View file

@ -1328,6 +1328,12 @@ sub update_nics {
# But we will set 'wantip' to the IPv4 so old functions continue to work until we update them all
$config{$h}{'wantip'} = $ipv4 if (!$ip && $ipv4);
if (!$ip && !$ipv4 && !$ipv6)
{
warning("Could not determine an IP for %s", $h);
next;
}
next if !nic_updateable($h, $updateable);
push @hosts, $h;