summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-01-08 10:40:44 -0500
committerjim-p <jimp@pfsense.org>2015-01-08 10:41:38 -0500
commit1776d19e58ed1b2ed350d044572edf350344315e (patch)
treebfa79d0e11f838f121b5577609dbe7199a0c5394 /etc
parent1ba501546776e07375917c8ba2e623cea07851f0 (diff)
downloadpfsense-1776d19e58ed1b2ed350d044572edf350344315e.zip
pfsense-1776d19e58ed1b2ed350d044572edf350344315e.tar.gz
Change OpenVPN CARP VIP test to be more accurate. The client should also not be run if the VIP is in the INIT state.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/openvpn.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 2495cde..3bdb5a6 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -865,14 +865,14 @@ function openvpn_restart($mode, $settings) {
return;
/* Do not start a client if we are a CARP backup on this vip! */
- if (($mode == "client") && (strstr($settings['interface'], "_vip") && get_carp_interface_status($settings['interface']) == "BACKUP"))
+ if (($mode == "client") && (strstr($settings['interface'], "_vip") && get_carp_interface_status($settings['interface']) != "MASTER"))
return;
/* Check if client is bound to a gateway group */
$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']) == "BACKUP"))
+ if (($a_groups[$settings['interface']][0]['vip'] <> "") && (get_carp_interface_status($a_groups[$settings['interface']][0]['vip']) != "MASTER"))
return;
}
OpenPOWER on IntegriCloud