mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Verify carp VHIDS no matter what and compare to current id if needed Resolves #189
This commit is contained in:
parent
07a3b40b0b
commit
03fdfdd652
@ -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.";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user