Revision 6eb6e720
Added by Shahid Sheikh almost 12 years ago
etc/inc/openvpn.inc | ||
---|---|---|
790 | 790 |
if (($mode == "client") && strstr($settings['interface'], "_vip") && (get_carp_interface_status($settings['interface']) == "BACKUP")) |
791 | 791 |
return; |
792 | 792 |
|
793 |
/* Check if client is bound to a gateway group */
|
|
794 |
$a_groups = return_gateway_groups_array();
|
|
795 |
if (is_array($a_groups[$settings['interface']])) {
|
|
796 |
/* the interface is a gateway group. If a vip is defined and its a CARP backup then do not start */
|
|
797 |
if (($a_groups[$settings['interface']][0]['vip'] <> "") && (get_carp_interface_status($a_groups[$settings['interface']][0]['vip']) == "BACKUP"))
|
|
798 |
return;
|
|
799 |
}
|
|
793 |
/* Check if client is bound to a gateway group */
|
|
794 |
$a_groups = return_gateway_groups_array();
|
|
795 |
if (is_array($a_groups[$settings['interface']])) {
|
|
796 |
/* the interface is a gateway group. If a vip is defined and its a CARP backup then do not start */
|
|
797 |
if (($a_groups[$settings['interface']][0]['vip'] <> "") && (get_carp_interface_status($a_groups[$settings['interface']][0]['vip']) == "BACKUP"))
|
|
798 |
return;
|
|
799 |
}
|
|
800 | 800 |
|
801 | 801 |
/* start the new process */ |
802 | 802 |
$fpath = $g['varetc_path']."/openvpn/{$mode_id}.conf"; |
Also available in: Unified diff
#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.