summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-04 04:01:41 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-04 04:01:41 +0000
commit7b0c0628c888e44ea642db6e101c0e506f9d630c (patch)
tree0fbcf5d42b6090182f1bd2d7f2f9d8d714657509 /etc/inc
parent2193a1f7df717d85a739b9055d0569d76da2b51d (diff)
downloadpfsense-7b0c0628c888e44ea642db6e101c0e506f9d630c.zip
pfsense-7b0c0628c888e44ea642db6e101c0e506f9d630c.tar.gz
Yet-another-submission-by: databeestje (Seth) (who will have a cvs bit soon)
CVSTrac message: This should fix it and might even work with https reading from the XML_RPC_Client code. Tested with http on port 8888 on both carp boxen. We need to state this in the Wiki Somewhere. For syncing configuration both carp machines need to be running the same protocol and on the same port to function. Teehee!
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc13
1 files changed, 12 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 834ba89..f3b90c4 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2329,13 +2329,20 @@ function process_carp_rules() {
}
function carp_sync_xml($url, $password, $section, $section_xml, $method = 'pfsense.restore_config_section') {
+ global $config;
$params = array(new XML_RPC_Value($password, 'string'),
new XML_RPC_Value($section, 'array'),
new XML_RPC_Value($section_xml, 'array'));
$msg = new XML_RPC_Message($method, $params);
+ if($config['system']['webgui']['port'] != "") {
+ $port = $config['system']['webgui']['port'];
+ $cli = new XML_RPC_Client('/xmlrpc.php', $url, $port);
+ } else {
$cli = new XML_RPC_Client('/xmlrpc.php', $url);
+ }
$cli->setCredentials('admin', $password);
$resp = $cli->send($msg);
+ log_error("synchronize XML to $url on port $port");
}
function carp_sync_client() {
@@ -2346,7 +2353,11 @@ function carp_sync_client() {
$already_processed = 1;
foreach($config['installedpackages']['carpsettings']['config'] as $carp) {
if($carp['synchronizetoip'] != "" ) {
- $synchronizetoip = $carp['synchronizetoip'];
+ if($config['system']['webgui']['protocol'] != "") {
+ $synchronizetoip = $config['system']['webgui']['protocol'];
+ $synchronizetoip .= "://";
+ }
+ $synchronizetoip .= $carp['synchronizetoip'];
$sections = array();
$sections_xml = array();
if($carp['synchronizerules'] != "" and is_array($config['filter'])) {
OpenPOWER on IntegriCloud