From 118acc33e5eeaf348ea98669a70c8abf6931d593 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 15 Apr 2019 18:59:13 +0200 Subject: [PATCH] routing, gateways. In gateway groups you could originally select a vip, which isn't used in our system. orgininally this came from https://github.com/pfsense/pfsense/commit/ab1112da4c1c8dc9c22486d0d69dca9cd1216cd2 Let's remove it while working on https://github.com/opnsense/core/issues/2279 --- src/etc/inc/gwlb.inc | 13 ++-------- src/www/system_gateway_groups_edit.php | 36 +------------------------- 2 files changed, 3 insertions(+), 46 deletions(-) diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc index c1db16acf..fdd3a9577 100644 --- a/src/etc/inc/gwlb.inc +++ b/src/etc/inc/gwlb.inc @@ -365,13 +365,12 @@ function return_gateway_groups_array() $gateway_groups_array = array(); if (isset($config['gateways']['gateway_group'])) { - $carplist = get_configured_carp_interface_list(); foreach ($config['gateways']['gateway_group'] as $group) { /* create array with group gateways members separated by tier */ $tiers = array(); $tiers_online = 0; foreach ($group['item'] as $item) { - list($gwname, $tier, $vipname) = explode("|", $item); + list($gwname, $tier) = explode("|", $item); if (!isset($tiers[$tier])) { $tiers[$tier] = array(); } @@ -386,12 +385,7 @@ function return_gateway_groups_array() } elseif (isset($gateways_arr[$gwname]['monitor_disable'])) { $gwup = true; } - $vip = null; - if (!empty($carplist[$vipname]) && is_ipaddr($carplist[$vipname])) { - $vip = $vipname; - } - - $tiers[$tier][] = array("up" => $gwup, "gwname" => $gwname, "vip" => $vip); + $tiers[$tier][] = array("up" => $gwup, "gwname" => $gwname); } /* sort the tiers array by the tier key */ @@ -419,9 +413,6 @@ function return_gateway_groups_array() $groupmember['int'] = $gateway['if']; $groupmember['gwip'] = $gatewayip; $groupmember['weight'] = isset($gateway['weight']) ? $gateway['weight'] : 1; - if (!empty($member_item['vip'])) { - $groupmember['vip'] = $member_item['vip']; - } $gateway_groups_array[$group['name']][] = $groupmember; } } diff --git a/src/www/system_gateway_groups_edit.php b/src/www/system_gateway_groups_edit.php index 9150c7b76..0e533e194 100644 --- a/src/www/system_gateway_groups_edit.php +++ b/src/www/system_gateway_groups_edit.php @@ -100,9 +100,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $pconfig['item'] = array(); foreach ($a_gateways as $gwname => $gateway) { if (isset($pconfig[$gwname]) && $pconfig[$gwname] > 0) { - $vipname = "{$gwname}_vip"; /* we have a priority above 0 (disabled), add item to list */ - $pconfig['item'][] = "{$gwname}|{$pconfig[$gwname]}|{$pconfig[$vipname]}"; + $pconfig['item'][] = "{$gwname}|{$pconfig[$gwname]}"; } /* check for overlaps */ if ($pconfig['name'] == $gwname) { @@ -217,39 +216,6 @@ $( document ).ready(function() { endfor;?> - - -