summaryrefslogtreecommitdiffstats
path: root/etc/inc/dyndns.class
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-04-13 21:08:26 +0000
committerErmal <eri@pfsense.org>2010-04-13 21:08:26 +0000
commitc3c3e03bf19cfb4e859375f02786aa0c5a4ff2f0 (patch)
treebac1062546a3f908eb9d76d0e367912aa48f8e02 /etc/inc/dyndns.class
parentd2946062aaf7a5442275a1c3d2bbab14a597f109 (diff)
downloadpfsense-c3c3e03bf19cfb4e859375f02786aa0c5a4ff2f0.zip
pfsense-c3c3e03bf19cfb4e859375f02786aa0c5a4ff2f0.tar.gz
Fix regex on matching ip when behind nat.
Diffstat (limited to 'etc/inc/dyndns.class')
-rw-r--r--etc/inc/dyndns.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index e2c1eda..a4f542b 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -857,7 +857,7 @@
$update_reason .= "Cached IP: {$cacheIP} WAN IP: {$wan_ip} ";
}
if (($currentTime - $cacheTime) > $time ) {
- $needs_updating = TRUE;
+ $needs_updating = true;
$update_reason = "DynDns: More than 25 days. Updating. ";
$update_reason .= "{$currentTime} - {$cacheTime} > {$time} ";
}
@@ -884,7 +884,7 @@
* - status is returned from a DynDNS service provider.
*/
function _debug ($data) {
- $string = date('m-d-y h:i:s').' - ('.$this->_debugID.') - ['.$this->_dnsService.'] - '.$data.'\n';
+ $string = '\n'.date('m-d-y h:i:s').' - ('.$this->_debugID.') - ['.$this->_dnsService.'] - '.$data.'\n';
conf_mount_rw();
$file = fopen($this->_debugFile, 'a');
fwrite($file, $string);
@@ -906,7 +906,7 @@
$ip_result_page = curl_exec($ip_ch);
curl_close($ip_ch);
$ip_result_decoded = urldecode($ip_result_page);
- preg_match('=Current IP Address: (.*)</body>=siU', $ip_result_decoded, $matches);
+ preg_match('/Current IP Address: (.*)<\/body>/', $ip_result_decoded, $matches);
$ip_address = trim($matches[1]);
log_error("DynDns debug information: {$ip_address} extracted from {$hosttocheck}");
} else
OpenPOWER on IntegriCloud