Project

General

Profile

Actions

Bug #3174

closed

OpenVPN Client bound to a gateway group should not start on backup CARP vip

Added by Shahid Sheikh over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
OpenVPN
Target version:
Start date:
09/01/2013
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1
Affected Architecture:

Description

There is no handling for gateway groups in

function openvpn_restart($mode, $settings)
. This causes an OpenVPN client to start even if the underlying vip is a CARP backup.

Recommend adding at line 792 of

openvpn.inc
:


    /* 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;
    }

Actions

Also available in: Atom PDF