diff options
author | Matt Corallo <matt@bluematt.me> | 2012-05-22 16:42:04 +0200 |
---|---|---|
committer | Matt Corallo <matt@bluematt.me> | 2012-05-22 23:58:30 +0200 |
commit | fffbfef0a8dee5a4c48fbcbe2a5e62f8ef7ca6ff (patch) | |
tree | 4201fccb88359df6b6c21ec20be20ca537c77fa4 /etc/inc | |
parent | 37f3e7041f927d692c7381b8df33d48ae1097cf1 (diff) | |
download | pfsense-fffbfef0a8dee5a4c48fbcbe2a5e62f8ef7ca6ff.zip pfsense-fffbfef0a8dee5a4c48fbcbe2a5e62f8ef7ca6ff.tar.gz |
Fix DynDNS issue introduced by f3b2b2a (_dnsIP was not set).
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/dyndns.class | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index ddb6739..f5eac57 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -156,7 +156,7 @@ $this->_dnsZoneID = $dnsZoneID; $this->_dnsTTL = $dnsTTL; $this->_if = get_real_interface($dnsIf); - $this->_ifIP = get_interface_ip($dnsIf); + $this->_checkIP(); $this->_dnsUpdateURL = $dnsUpdateURL; $this->_dnsResultMatch = $dnsResultMatch; $this->_dnsRequestIf = get_real_interface($dnsRequestIf); @@ -168,6 +168,11 @@ unlock($dyndnslck); return; } + if(!is_ipaddr($this->_dnsIP)) { + log_error("There was an error trying to determine the public IP for interface - {$dnsIf}({$this->_if}). Probably interface is not a WAN interface."); + unlock($dyndnslck); + return; + } $this->_debugID = rand(1000000, 9999999); @@ -1024,7 +1029,6 @@ 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} "; if (file_exists($this->_cacheFile)) { @@ -1134,6 +1138,8 @@ } else log_error("DynDns debug information: {$ip_address} extracted from local system."); + $this->_dnsIP = $ip_address; + return $ip_address; } |