summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-05-01 17:47:52 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-05-01 17:47:52 +0000
commitff66495424b65961cd379f6417814cf07061cbee (patch)
treef6a8f1bdbb15e7a0f4708ab2c2c680e1f4da36c0 /usr/local
parentc6c029ba405da58385d4ea82d20dd3bf2715f303 (diff)
downloadpfsense-ff66495424b65961cd379f6417814cf07061cbee.zip
pfsense-ff66495424b65961cd379f6417814cf07061cbee.tar.gz
Prevent a configuration sync loop from occuring when a cluster has two nodes.
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/xmlrpc.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index 8b3216b..8a9b071 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -37,6 +37,20 @@ require_once("config.inc");
require_once("functions.inc");
require_once("array_intersect_key.inc");
+/* grab sync to ip if enabled */
+if ($config['installedpackages']['carpsettings']['config']) {
+ foreach ($config['installedpackages']['carpsettings']['config'] as $carp) {
+ $synchronizetoip = $carp['synchronizetoip'];
+ }
+}
+
+if($synchronizetoip) {
+ if($synchronizetoip == $_SERVER['REMOTE_ADDR']) {
+ log_error("Disallowing CARP sync loop.");
+ die;
+ }
+}
+
$xmlrpc_g = array(
"return" => array(
"true" => new XML_RPC_Response(new XML_RPC_Value(true, $XML_RPC_Boolean)),
OpenPOWER on IntegriCloud