From bbb4d907ae033f4e14fd880fe92853fe3e11d525 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sat, 23 Nov 2019 10:07:44 +0100 Subject: [PATCH] CARP: typo in validation. related to https://github.com/opnsense/core/issues/3732 --- src/www/firewall_virtual_ip_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/www/firewall_virtual_ip_edit.php b/src/www/firewall_virtual_ip_edit.php index 16ff5ec9b..85da32212 100644 --- a/src/www/firewall_virtual_ip_edit.php +++ b/src/www/firewall_virtual_ip_edit.php @@ -132,7 +132,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($pconfig['mode'] == 'carp') { /* verify against reusage of vhids */ foreach($config['virtualip']['vip'] as $vipId => $vip) { - if (isset($vip['vhid']) && $vip['vhid'] == $pconfig['vhid'] && $vip['type'] == 'carp' && $vip['interface'] == $pconfig['interface'] && $vipId != $id) { + if (isset($vip['vhid']) && $vip['vhid'] == $pconfig['vhid'] && $vip['mode'] == 'carp' && $vip['interface'] == $pconfig['interface'] && $vipId != $id) { $input_errors[] = sprintf(gettext("VHID %s is already in use on interface %s. Pick a unique number on this interface."),$pconfig['vhid'], convert_friendly_interface_to_friendly_descr($pconfig['interface'])); } }