Actions
Bug #3172
closedfunction 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
Actions