From 5980fbbeb34edf7155e0137b739bb2c7a81efefa Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 30 Apr 2007 20:42:55 +0000 Subject: Do not allow the setting of the carp sync ip to be an ip address on the same firewall. This leads to a sync loop. --- usr/local/pkg/carp_settings.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'usr/local/pkg/carp_settings.xml') diff --git a/usr/local/pkg/carp_settings.xml b/usr/local/pkg/carp_settings.xml index cb34bb5..95c00dc 100644 --- a/usr/local/pkg/carp_settings.xml +++ b/usr/local/pkg/carp_settings.xml @@ -160,6 +160,12 @@ if($_POST["synchronizetoip"]) if(!is_ipaddr($_POST["synchronizetoip"])) $input_errors[] = "You must specify a valid IP address."; + $ifdescrs = array('lan','wan'); + for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) + $ifdescrs['opt' . $j] = "opt" . $j; + foreach($ifdescrs as $descr) + if($config['interfaces']['$descr']['ipaddr'] == $_POST["synchronizetoip"]) + $input_errors[] = "CARP sync IP must be the backup firewall ip! You cannot specify this firewalls IP in this location."; /* setup carp interfaces */ -- cgit v1.1