diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-08-23 22:30:58 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-08-23 22:30:58 +0000 |
commit | ebdff8197382332ff5738a95548b12ab017fc939 (patch) | |
tree | 7a39cd58961cdabe08e0cb0705e58f3987b86129 | |
parent | 0604be0edd7a964edab2d20bea203da1320d422b (diff) | |
download | pfsense-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!
-rwxr-xr-x | usr/local/www/firewall_virtual_ip_edit.php | 5 |
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']); |