diff options
author | Ermal <eri@pfsense.org> | 2010-04-13 21:08:26 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-04-13 21:08:26 +0000 |
commit | c3c3e03bf19cfb4e859375f02786aa0c5a4ff2f0 (patch) | |
tree | bac1062546a3f908eb9d76d0e367912aa48f8e02 /etc | |
parent | d2946062aaf7a5442275a1c3d2bbab14a597f109 (diff) | |
download | pfsense-c3c3e03bf19cfb4e859375f02786aa0c5a4ff2f0.zip pfsense-c3c3e03bf19cfb4e859375f02786aa0c5a4ff2f0.tar.gz |
Fix regex on matching ip when behind nat.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/dyndns.class | 6 |
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 |