summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_virtual_ip_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-08-23 22:30:58 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-08-23 22:30:58 +0000
commitebdff8197382332ff5738a95548b12ab017fc939 (patch)
tree7a39cd58961cdabe08e0cb0705e58f3987b86129 /usr/local/www/firewall_virtual_ip_edit.php
parent0604be0edd7a964edab2d20bea203da1320d422b (diff)
downloadpfsense-ebdff8197382332ff5738a95548b12ab017fc939.zip
pfsense-ebdff8197382332ff5738a95548b12ab017fc939.tar.gz
Do not allow duplicate VHIDS to be defined. It's asking for trouble. And spell vhid correctly this time!
Diffstat (limited to 'usr/local/www/firewall_virtual_ip_edit.php')
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index 9c21748..54e8e4a 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -114,6 +114,11 @@ if ($_POST) {
* on one of our interfaces (wan, lan optX)
*/
if ($_POST['mode'] == "carp") {
+ /* verify against reusage of vhids */
+ foreach($config['virtualip']['vip'] as $vip) {
+ if($vip['vhid'] == $_POST['vhid'])
+ $input_errors[] = "VHID {$_POST['vhid']} is already in use. Pick a unique number.";
+ }
$can_post = true;
$found = false;
$subnet_ip = return_first_two_octets($_POST['subnet']);
OpenPOWER on IntegriCloud