diff options
author | Ermal <eri@pfsense.org> | 2011-05-25 16:51:53 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-05-25 16:51:53 +0000 |
commit | 193ee786a468c7fdcc3fc9086d1747b3d879c4a5 (patch) | |
tree | cfcfff63f48466115b9ecbe6b6b255399268cde8 /etc/inc/dyndns.class | |
parent | dd575ea43699b452e1e925518bc9e59f5db78d6f (diff) | |
download | pfsense-193ee786a468c7fdcc3fc9086d1747b3d879c4a5.zip pfsense-193ee786a468c7fdcc3fc9086d1747b3d879c4a5.tar.gz |
Actually add more error checking and do not schedule a scan if it is not possible to retreive the wan ip address.
Diffstat (limited to 'etc/inc/dyndns.class')
-rw-r--r-- | etc/inc/dyndns.class | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index 4697da7..d8a350b 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -861,8 +861,8 @@ $wan_ip = $this->_checkIP(); if ($wan_ip == 0) { - log_error("DynDns: Current WAN IP could not be determined."); - return true; + log_error("DynDns: Current WAN IP could not be determined, skipping update process."); + return false; } $this->_dnsIP = $wan_ip; log_error("DynDns: Current WAN IP: {$wan_ip}"); @@ -935,6 +935,8 @@ log_error("DynDns: _checkIP() starting."); $ip_address = find_interface_ip($this->_if); + if (!is_ipaddr($ip_address)) + return 0; $this->_ifIP = $ip_address; if (is_private_ip($ip_address)) { $hosttocheck = "checkip.dyndns.org"; |