summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index d7e1f53..53cf4f5 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -970,23 +970,27 @@ function validate_address_family($ipaddr, $gwname) {
/* check if a interface is part of a gateway group */
function interface_gateway_group_member($interface) {
global $config;
- $realif = get_real_interface($interface);
- if(is_array($config['gateways']['gateway_group']))
+
+ if (is_array($config['gateways']['gateway_group']))
$groups = $config['gateways']['gateway_group'];
else
return false;
+ $gateways_arr = return_gateways_array(false, true);
foreach($groups as $group) {
if(is_array($group['item'])) {
foreach($group['item'] as $item) {
$elements = explode("|", $item);
$gwname = $elements[0];
- $gwif = get_real_interface(lookup_gateway_interface_by_name($gwname));
- if($gwif == $realif)
+ if ($interface == $gateways_arr[$gwname]['interface']) {
+ unset($gateways_arr);
return true;
+ }
}
}
}
+ unset($gateways_arr);
+
return false;
}
OpenPOWER on IntegriCloud