Handle freedns response when IP address unchanged.

Handles 'ERROR' response returned by freedns when the IP address has not changed.
This commit is contained in:
hattiecat 2017-05-04 09:49:58 +09:00 committed by GitHub
parent 94dc35984f
commit 00b0e61302

View file

@ -3841,6 +3841,12 @@ sub nic_freedns_update {
$config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good';
success("updating %s: good: IP address set to %s", $h, $ip);
} elsif ($reply =~ /ERROR: Address (.*) has not changed\./) {
$ip = $1;
$config{$h}{'ip'} = $ip;
$config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good';
success("update not necessary %s: IP address already set to %s", $h, $ip);
} else {
$config{$h}{'status'} = 'failed';
warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose');