Project

General

Profile

Actions

Bug #3172

closed

function return_gateway_groups_array() returns the incorrect vip

Added by Shahid Sheikh about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Gateways
Target version:
Start date:
08/31/2013
Due date:
% Done:

100%

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

Description

I am not even a PHP novice so please take these findings with a grain of salt.

The vip returned is always the last vip that the


        foreach ($group['item'] as $item) { ... }

starting line 690 of gwlb.inc iterates through.

In my case this is causing OpenVPN Server to bind to the vip on the backup tier.

I think to fix it two changes are needed.

1. Line 694 should be:

        if (!is_array($gwvip_arr[$group['name']]))

and 2. Lines 766 and 767 should be:

        if (is_array($gwvip_arr[$group['name']])&& !empty($gwvip_arr[$group['name']][$member]))
            $groupmember['vip'] = $gwvip_arr[$group['name']][$member];

Thanks,

Shahid

Actions #1

Updated by Renato Botelho about 8 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Chris Buechler about 8 years ago

Shahid: can you please confirm if that fixed what you were seeing?

Actions #4

Updated by Shahid Sheikh about 8 years ago

Yep, its fixed. Thx.

Actions #5

Updated by Renato Botelho about 8 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF