summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorShahid Sheikh <shahidsheikh10@yahoo.com>2013-09-02 16:13:07 -0400
committerShahid Sheikh <shahidsheikh10@yahoo.com>2013-09-02 16:13:07 -0400
commit6eb6e720fce2c58bd58cb1a573898d2b630db5a3 (patch)
treeddda0e2174757c367afab6ab4d57ff0797cb159c /etc/inc/openvpn.inc
parent414edd3e10667c41f880085b37a278f9121c39aa (diff)
downloadpfsense-6eb6e720fce2c58bd58cb1a573898d2b630db5a3.zip
pfsense-6eb6e720fce2c58bd58cb1a573898d2b630db5a3.tar.gz
#3174 Handling of gateway groups in openvpn_restart()
If the underlying vip of a gateway group that an openvpn client is bound to is in backup mode then the client should not start.
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 94290ae..b680ce1 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -790,13 +790,13 @@ function openvpn_restart($mode, $settings) {
if (($mode == "client") && strstr($settings['interface'], "_vip") && (get_carp_interface_status($settings['interface']) == "BACKUP"))
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"))
- 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"))
+ return;
+ }
/* start the new process */
$fpath = $g['varetc_path']."/openvpn/{$mode_id}.conf";
OpenPOWER on IntegriCloud