When editing a CARP VIP do not complain about the VHID when the record id matches

This commit is contained in:
Scott Ullrich 2007-02-27 17:09:46 +00:00
parent d44bccc798
commit d0dd13efda

View File

@ -116,9 +116,11 @@ if ($_POST) {
if ($_POST['mode'] == "carp") {
if(!$id) {
/* verify against reusage of vhids */
$idtracker=0;
foreach($config['virtualip']['vip'] as $vip) {
if($vip['vhid'] == $_POST['vhid'])
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'] == "")