From cd632551ce80638778c27d430e88cc714edffa88 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 4 Jan 2019 21:25:25 +0100 Subject: [PATCH] carp_status.php, disable ip aliases configured with vhid on "temporarily disable carp", closes https://github.com/opnsense/core/issues/3097 --- src/www/carp_status.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/www/carp_status.php b/src/www/carp_status.php index e0ea98620..2cbdfb3b1 100644 --- a/src/www/carp_status.php +++ b/src/www/carp_status.php @@ -56,17 +56,19 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } } foreach ($a_vip as $vip) { - if ($vip['mode'] == 'carp') { + if (!empty($vip['vhid'])) { switch ($act) { case 'maintenance': - interface_carp_configure($vip); + case 'enable': + if ($vip['mode'] == 'carp') { + interface_carp_configure($vip); + } else { + interface_ipalias_configure($vip); + } break; case 'disable': interface_vip_bring_down($vip); break; - case 'enable': - interface_carp_configure($vip); - break; default: break; }