diff options
author | Shahid Sheikh <shahidsheikh10@yahoo.com> | 2013-09-02 16:09:46 -0400 |
---|---|---|
committer | Shahid Sheikh <shahidsheikh10@yahoo.com> | 2013-09-02 16:09:46 -0400 |
commit | 414edd3e10667c41f880085b37a278f9121c39aa (patch) | |
tree | 47dfdd14b5dc983a71b497c1c1ec0af06b9a4179 /etc | |
parent | 7a6851dff7763fc85d03648ca30039fcd53ac620 (diff) | |
download | pfsense-414edd3e10667c41f880085b37a278f9121c39aa.zip pfsense-414edd3e10667c41f880085b37a278f9121c39aa.tar.gz |
#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..94290ae 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); |