aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-02-13 23:42:20 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-02-13 23:42:20 +0000
commit882caacd1bf76a6213bb0828d70e505a88c6a29e (patch)
treeb8a183ba89267312ad49213957ea96f7110591ac
parent7ae8134c78c7f74d72105a521112cfe3e60e76c1 (diff)
downloadpfsense-packages-882caacd1bf76a6213bb0828d70e505a88c6a29e.tar.gz
pfsense-packages-882caacd1bf76a6213bb0828d70e505a88c6a29e.tar.bz2
pfsense-packages-882caacd1bf76a6213bb0828d70e505a88c6a29e.zip
Do not attempt sync if a blank ip is passed
-rw-r--r--packages/tinydns/tinydns.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc
index f5e6c1f4..3fd5279c 100644
--- a/packages/tinydns/tinydns.inc
+++ b/packages/tinydns/tinydns.inc
@@ -156,14 +156,14 @@ function tinydns_get_record_status($record, $pingthreshold = "", $wanpingthresho
}
if($pingthreshold) {
$current_ms = "";
- if(file_exists("var/db/pingmsstatus/$record"))
+ if(file_exists("var/db/pingmsstatus/$record"))
$current_ms = file_get_contents("/var/db/pingmsstatus/$record");
if($pingthreshold > $current_ms)
return "DOWN";
}
if($wanpingthreshold) {
$current_avg = "";
- if(file_exists("/var/db/wanaverage"))
+ if(file_exists("/var/db/wanaverage"))
$current_avg = file_get_contents("/var/db/wanaverage");
if($wanpingthreshold > $current_avg)
return "DOWN";
@@ -260,7 +260,7 @@ function tinydns_create_zone_file() {
config_lock();
if(file_exists("/service/tinydns/root/data"))
exec("rm -f /service/tinydns/root/data");
- if(!is_dir("/service/tinydns/root"))
+ if(!is_dir("/service/tinydns/root"))
return;
$fd = fopen("/service/tinydns/root/data", "w");
if(!$fd) {
@@ -348,7 +348,7 @@ function tinydns_get_rowline_data($recordip, $recordtype, $ttl, $hostname,$rdns)
$record_data = "={$hostname}:{$recordip}{$ttl_string}";
else
/* "+" creates "A" records only to allow forward DNS */
- $record_data = "+{$hostname}:{$recordip}{$ttl_string}";
+ $record_data = "+{$hostname}:{$recordip}{$ttl_string}";
break;
case "CNAME":
$record_data = "C{$hostname}:{$recordip}{$ttl_string}";
@@ -367,6 +367,9 @@ function tinydns_do_xmlrpc_sync($sync_to_ip, $password) {
if(!$password)
return;
+ if(!$sync_to_ip)
+ return;
+
log_error("[tinydns] tinydns_xmlrpc_sync.php is starting to {$sync_to_ip}.");
$xmlrpc_sync_neighbor = $sync_to_ip;
if($config['system']['webgui']['protocol'] != "") {