diff options
author | Chris Buechler <cmb@pfsense.org> | 2013-09-03 10:04:05 -0700 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2013-09-03 10:04:05 -0700 |
commit | 0c1870ca7d16ea76d009f39823b54c8f90a3d1b6 (patch) | |
tree | 0b3ca0b100e72ddbbee83eb841c15be4365bfcef /etc | |
parent | 96551a20bae80cf791bd25e2e0a1cd0cc48cb32b (diff) | |
parent | 6eb6e720fce2c58bd58cb1a573898d2b630db5a3 (diff) | |
download | pfsense-0c1870ca7d16ea76d009f39823b54c8f90a3d1b6.zip pfsense-0c1870ca7d16ea76d009f39823b54c8f90a3d1b6.tar.gz |
Merge pull request #790 from shahidsheikh/RELENG_2_1
#3174 Added handling of gateway groups in openvpn_restart
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/openvpn.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index 75eba9e..b680ce1 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -790,6 +790,14 @@ 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; + } + /* start the new process */ $fpath = $g['varetc_path']."/openvpn/{$mode_id}.conf"; openvpn_clear_route($mode, $settings); |