summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-02 21:27:03 +0200
committersmos <seth.mos@dds.nl>2012-06-02 21:27:03 +0200
commitab1112da4c1c8dc9c22486d0d69dca9cd1216cd2 (patch)
treefc740f00604e6cb79b46ccf5e018fdc7ad00d280 /etc/inc/gwlb.inc
parent27a7980237460a5d459b53c7d63bb9b54af122b7 (diff)
downloadpfsense-ab1112da4c1c8dc9c22486d0d69dca9cd1216cd2.zip
pfsense-ab1112da4c1c8dc9c22486d0d69dca9cd1216cd2.tar.gz
The gateway groups array now knows about vips to be tied into that gateway group so we can tie the groups into services.
Redmine ticket #1965
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 68b3e48..dd79de2 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -631,6 +631,7 @@ function return_gateway_groups_array() {
$gateways_status = return_gateways_status(true);
$gateways_arr = return_gateways_array();
$gateway_groups_array = array();
+ $carplist = get_configured_carp_interface_list();
if (isset($config['system']['gw_switch_default'])) {
/*
@@ -694,6 +695,9 @@ function return_gateway_groups_array() {
$itemsplit = explode("|", $item);
$tier = $itemsplit[1];
$gwname = $itemsplit[0];
+ $vipname = $itemsplit[2];
+ if(is_ipaddr($carplist[$vipname]))
+ $gwvip_arr[$group['name']][$gwname] = $vipname;
/* Do it here rather than reiterating again the group in case no member is up. */
$backupplan[$tier][] = $gwname;
@@ -757,6 +761,8 @@ function return_gateway_groups_array() {
$groupmember['int'] = $int;
$groupmember['gwip'] = $gatewayip;
$groupmember['weight'] = isset($gateway['weight']) ? $gateway['weight'] : 1;
+ if($gwvip_arr[$group['name']][$gwname] <> "")
+ $groupmember['vip'] = $gwvip_arr[$group['name']][$gwname];
$gateway_groups_array[$group['name']]['ipprotocol'] = $gateway['ipprotocol'];
$gateway_groups_array[$group['name']][] = $groupmember;
}
OpenPOWER on IntegriCloud