From c6c029ba405da58385d4ea82d20dd3bf2715f303 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 1 May 2007 16:40:23 +0000 Subject: Allow synchornize to ip to be blank. --- usr/local/pkg/carp_settings.xml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'usr/local/pkg') diff --git a/usr/local/pkg/carp_settings.xml b/usr/local/pkg/carp_settings.xml index 26dc823..f0b290a 100644 --- a/usr/local/pkg/carp_settings.xml +++ b/usr/local/pkg/carp_settings.xml @@ -157,24 +157,25 @@ - if($_POST["synchronizetoip"]) + 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."; - if($config['virtualip']['vip']) { - foreach($config['virtualip']['vip'] as $vip) { - if($vip['subnet'] == $_POST["synchronizetoip"]) + $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."; + if($config['virtualip']['vip']) { + foreach($config['virtualip']['vip'] as $vip) { + if($vip['subnet'] == $_POST["synchronizetoip"]) + $input_errors[] = "CARP sync IP must be the backup firewall IP! You cannot specify this firewalls IP in this location."; + } } + $wanip = find_interface_ip(get_real_wan_interface()); + if($wanip == $_POST["synchronizetoip"]) + $input_errors[] = "CARP sync IP must be the backup firewall IP! You cannot specify this firewalls IP in this location."; } - $wanip = find_interface_ip(get_real_wan_interface()); - if($wanip == $_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