summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
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:37 -0500
commit725d54bd9a89346aa0a0ab62a7d54bf0194df2de (patch)
tree46982f55200eaf12dd69d44aa0e3917d13e71816 /etc/inc/openvpn.inc
parentae952a031cf05d7853930a63ebbe1ee50ebb9619 (diff)
downloadpfsense-725d54bd9a89346aa0a0ab62a7d54bf0194df2de.zip
pfsense-725d54bd9a89346aa0a0ab62a7d54bf0194df2de.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/inc/openvpn.inc')
-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