Skip to content

Commit

Permalink
Fixed hosts trying to update if IP acquisition failed
Browse files Browse the repository at this point in the history
  • Loading branch information
LenardHess committed Jul 18, 2023
1 parent 6fd8496 commit fcfd833
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions ddclient.in
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fcfd833

Please sign in to comment.