diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-11-30 03:53:34 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-11-30 03:53:34 +0000 |
commit | 1a94ea6ca8648729a56723f98fde3eae99f9abc4 (patch) | |
tree | c15e0efd9e37b62b62b2ae3b0722f2c1e51ab2b1 | |
parent | d962e30281ba61e23e3867bad35c9c30369998b4 (diff) | |
download | pfsense-1a94ea6ca8648729a56723f98fde3eae99f9abc4.zip pfsense-1a94ea6ca8648729a56723f98fde3eae99f9abc4.tar.gz |
MFC 8197
Tickets:
#700 Problem when "Synchronize Enabled"
#716 syncing configuration data brokenMFC 8197
Tickets:
#700 Problem when "Synchronize Enabled"
#716 syncing configuration data brokenMFC 8197
Tickets:
#700 Problem when "Synchronize Enabled"
#716 syncing configuration data brokenMFC 8197
Tickets:
#700 Problem when "Synchronize Enabled"
#716 syncing configuration data brokenMFC 8197
Tickets:
#700 Problem when "Synchronize Enabled"
#716 syncing configuration data brokenMFC 8197
Tickets:
#700 Problem when "Synchronize Enabled"
#716 syncing configuration data brokenMFC 8197
Tickets:
#700 Problem when "Synchronize Enabled"
#716 syncing configuration data brokenMFC 8197
Tickets:
#700 Problem when "Synchronize Enabled"
#716 syncing configuration data broken
-rw-r--r-- | etc/inc/filter.inc | 17 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 8 |
2 files changed, 16 insertions, 9 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 21a916e..2d7f2e2 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1995,12 +1995,23 @@ function carp_sync_xml($url, $password, $sections, $port = 80, $method = 'pfsens if($g['booting']) return; + foreach($sections as $section) { + /* we can't use array_intersect_key() + due to the vip 'special case' */ + if($section != 'virtualip') { + $xml[$section] = $config[$section]; + } else { + $xml[$section] = backup_vip_config_section(); + } + } + $params = array( XML_RPC_encode($password), - XML_RPC_encode($sections) + XML_RPC_encode($xml) ); - $msg = new XML_RPC_Message($method, $params); + log_error("Beginning XMLRPC sync to {$url}:{$port}."); + $msg = new XML_RPC_Message($method, $params); $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port); $cli->setCredentials('admin', $password); if($g['debug']) $cli->setDebug(1); @@ -2069,7 +2080,7 @@ function carp_sync_client() { $sections[] = 'staticroutes'; } if($carp['synchronizevirtualip'] != "" and is_array($config['virtualip'])) { - $sections[] = backup_vip_config_section(); + $sections[] = 'virtualip'; } if($carp['synchronizelb'] != "" and is_array($config['load_balancer'])) { $sections[] = 'load_balancer'; diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index dc2566c..f4ffd43 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -842,11 +842,7 @@ function backup_vip_config_section() { } $temp['vip'][] = $section; } - - /* generate configuration XML */ - $xmlconfig = dump_xml_config($temp, "virtualip"); - $xmlconfig = str_replace("<?xml version=\"1.0\"?>", "", $xmlconfig); - return $xmlconfig; + return $temp; } /* @@ -1382,4 +1378,4 @@ function reload_all_sync() { } -?>
\ No newline at end of file +?> |