diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-05-01 16:40:23 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-05-01 16:40:23 +0000 |
commit | c6c029ba405da58385d4ea82d20dd3bf2715f303 (patch) | |
tree | 4f903c48c342cc0d1af5f4ec222035de5435bb8f /usr/local | |
parent | f898cf33c15a03ddbace5893531c3db4e180c270 (diff) | |
download | pfsense-c6c029ba405da58385d4ea82d20dd3bf2715f303.zip pfsense-c6c029ba405da58385d4ea82d20dd3bf2715f303.tar.gz |
Allow synchornize to ip to be blank.
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/pkg/carp_settings.xml | 27 |
1 files changed, 14 insertions, 13 deletions
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 @@ </field> </fields> <custom_php_validation_command> - 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."; </custom_php_validation_command> <custom_add_php_command_late> /* setup carp interfaces */ |