diff options
author | jim-p <jimp@pfsense.org> | 2015-01-08 10:40:44 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-01-08 10:41:38 -0500 |
commit | 1776d19e58ed1b2ed350d044572edf350344315e (patch) | |
tree | bfa79d0e11f838f121b5577609dbe7199a0c5394 /etc | |
parent | 1ba501546776e07375917c8ba2e623cea07851f0 (diff) | |
download | pfsense-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.inc | 4 |
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; } |