Actions
Bug #3172
closed
SS
function return_gateway_groups_array() returns the incorrect vip
Bug #3172:
function return_gateway_groups_array() returns the incorrect vip
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
RB Updated by Renato Botelho about 13 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset commit:22234bbb2f3ea46fc61bb5adeabec1e94ccf167f.
RB Updated by Renato Botelho about 13 years ago
Applied in changeset commit:7a6851dff7763fc85d03648ca30039fcd53ac620.
CB Updated by Chris Buechler about 13 years ago
Shahid: can you please confirm if that fixed what you were seeing?
SS Updated by Shahid Sheikh about 13 years ago
Yep, its fixed. Thx.
RB Updated by Renato Botelho about 13 years ago
- Status changed from Feedback to Resolved
Actions