From 9f8751b5c2426a4932cb813dae33198961ccff4b Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 19 Jan 2017 12:22:32 +0545 Subject: Fix #7136 Start OpenVPN on ordinary VIP (cherry picked from commit ddf99718d5f1f4545483c39d3759fdfbb788b0fb) --- src/etc/inc/openvpn.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/etc/inc/openvpn.inc') diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc index 39e7e9d..2e80d70 100644 --- a/src/etc/inc/openvpn.inc +++ b/src/etc/inc/openvpn.inc @@ -1131,7 +1131,7 @@ function openvpn_restart($mode, $settings) { } /* Do not start an instance if we are not CARP master on this vip! */ - if (strstr($settings['interface'], "_vip") && get_carp_interface_status($settings['interface']) != "MASTER") { + if (strstr($settings['interface'], "_vip") && !in_array(get_carp_interface_status($settings['interface']), array("MASTER", ""))) { unlock($lockhandle); return; } @@ -1140,7 +1140,7 @@ function openvpn_restart($mode, $settings) { $a_groups = return_gateway_groups_array(); if (is_array($a_groups[$settings['interface']])) { /* the interface is a gateway group. If a vip is defined and its a CARP backup then do not start */ - if (($a_groups[$settings['interface']][0]['vip'] <> "") && (get_carp_interface_status($a_groups[$settings['interface']][0]['vip']) != "MASTER")) { + if (($a_groups[$settings['interface']][0]['vip'] <> "") && (!in_array(get_carp_interface_status($a_groups[$settings['interface']][0]['vip']), array("MASTER", "")))) { unlock($lockhandle); return; } -- cgit v1.1