diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-05-01 17:47:52 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-05-01 17:47:52 +0000 |
commit | ff66495424b65961cd379f6417814cf07061cbee (patch) | |
tree | f6a8f1bdbb15e7a0f4708ab2c2c680e1f4da36c0 | |
parent | c6c029ba405da58385d4ea82d20dd3bf2715f303 (diff) | |
download | pfsense-ff66495424b65961cd379f6417814cf07061cbee.zip pfsense-ff66495424b65961cd379f6417814cf07061cbee.tar.gz |
Prevent a configuration sync loop from occuring when a cluster has two nodes.
-rwxr-xr-x | usr/local/www/xmlrpc.php | 14 |
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)), |