aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-16 14:48:07 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-16 14:48:07 +0000
commitd6cd153bbba83b1e3e4ee742c37f5b84041dceb9 (patch)
treee307e072d82b1f0c182298a56c7c892739c75540
parent3d04e6799abee0b1c3ef5cc7fd630a9ca6d33267 (diff)
downloadpfsense-packages-d6cd153bbba83b1e3e4ee742c37f5b84041dceb9.tar.gz
pfsense-packages-d6cd153bbba83b1e3e4ee742c37f5b84041dceb9.tar.bz2
pfsense-packages-d6cd153bbba83b1e3e4ee742c37f5b84041dceb9.zip
Only sync a configuration if the item is an array (IE: it has data inside it).
-rw-r--r--packages/carp_sync_client.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/carp_sync_client.php b/packages/carp_sync_client.php
index 6a295636..d7e9146a 100644
--- a/packages/carp_sync_client.php
+++ b/packages/carp_sync_client.php
@@ -35,7 +35,7 @@ if($already_processed != 1)
/* lets sync! */
$synchronizetoip = $carp['synchronizetoip'];
$files_to_copy = "";
- if($carp['synchronizerules'] <> "") {
+ if($carp['synchronizerules'] <> "" and is_array($config['filter'])) {
$current_rules_section = backup_config_section("filter");
/* generate firewall rules xml */
$fout = fopen("{$g['tmp_path']}/filter_section.txt","w");
@@ -43,7 +43,7 @@ if($already_processed != 1)
fclose($fout);
$files_to_copy .= "{$g['tmp_path']}/filter_section.txt";
}
- if($carp['synchronizenat'] <> "") {
+ if($carp['synchronizenat'] <> "" and is_array($config['nat'])) {
$current_nat_section = backup_config_section("nat");
/* generate nat rules xml */
$fout = fopen("{$g['tmp_path']}/nat_section.txt","w");
@@ -51,7 +51,7 @@ if($already_processed != 1)
fclose($fout);
$files_to_copy .= " {$g['tmp_path']}/nat_section.txt";
}
- if($carp['synchronizealiases'] <> "") {
+ if($carp['synchronizealiases'] <> "" and is_array($config['aliases'])) {
$current_aliases_section = backup_config_section("aliases");
/* generate aliases xml */
$fout = fopen("{$g['tmp_path']}/aliases_section.txt","w");
@@ -59,7 +59,7 @@ if($already_processed != 1)
fclose($fout);
$files_to_copy .= " {$g['tmp_path']}/aliases_section.txt";
}
- if($carp['synchronizetrafficshaper'] <> "") {
+ if($carp['synchronizetrafficshaper'] <> "" and is_array($config['shaper'])) {
$current_trafficshaper_section = backup_config_section("shaper");
/* generate aliases xml */
$fout = fopen("{$g['tmp_path']}/shaper_section.txt","w");