diff options
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/firewall_virtual_ip_edit.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 851c92b..c388842 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -127,14 +127,12 @@ if ($_POST) { * on one of our interfaces (wan, lan optX) */ if ($_POST['mode'] == "carp" or $_POST['mode'] == "carpdev-dhcp") { - if(!$id) { - /* verify against reusage of vhids */ - $idtracker=0; - foreach($config['virtualip']['vip'] as $vip) { - if($vip['vhid'] == $_POST['vhid'] and $idtracker <> $id) - $input_errors[] = "VHID {$_POST['vhid']} is already in use. Pick a unique number."; - $idtracker++; - } + /* verify against reusage of vhids */ + $idtracker = 0; + foreach($config['virtualip']['vip'] as $vip) { + if($vip['vhid'] == $_POST['vhid'] and $idtracker <> $id) + $input_errors[] = "VHID {$_POST['vhid']} is already in use. Pick a unique number."; + $idtracker++; } if($_POST['password'] == "") $input_errors[] = "You must specify a CARP password that is shared between the two VHID members."; |