summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-02-02 00:22:12 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-02-02 00:22:12 +0000
commitc565c45b4e136e102a950fa57f29ebd723c72378 (patch)
tree1bf53110e1b7755a2cdc274861ac6c33f2f82f47 /etc
parent8588ce31ebee0b992c1e39c64c4148be40767d11 (diff)
downloadpfsense-c565c45b4e136e102a950fa57f29ebd723c72378.zip
pfsense-c565c45b4e136e102a950fa57f29ebd723c72378.tar.gz
Do not sync items marked with <nosync/>
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc17
1 files changed, 16 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 7c358b6..e9125f9 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2056,6 +2056,21 @@ function process_carp_rules() {
function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsense.restore_config_section') {
global $config, $g;
+ $config_copy = $config;
+
+ /* strip out nosync items */
+ for($x=0; $x<count($config_copy['nat']['advancedoutbound']['rule']); $x++) {
+ if(isset($config_copy['nat']['advancedoutbound']['rule'][$x]['nosync']))
+ unset($config_copy['nat']['advancedoutbound']['rule'][$x]['nosync']);
+ }
+ for($x=0; $x<count($config_copy['nat']['rule']); $x++) {
+ if(isset($config_copy['nat']['rule'][$x]['nosync']))
+ unset($config_copy['nat']['rule'][$x]['nosync']);
+ }
+ for($x=0; $x<count($config_copy['filter']['rule']); $x++) {
+ if(isset($config_copy['filter']['rule'][$x]['nosync']))
+ unset($config_copy['filter']['rule'][$x]['nosync']);
+ }
if($g['booting'])
return;
@@ -2064,7 +2079,7 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens
/* we can't use array_intersect_key()
due to the vip 'special case' */
if($section != 'virtualip') {
- $xml[$section] = $config[$section];
+ $xml[$section] = $config_copy[$section];
} else {
$xml[$section] = backup_vip_config_section();
}
OpenPOWER on IntegriCloud