mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
remove unused functions gwlb.inc
This commit is contained in:
parent
3922acc309
commit
a84ff2b172
@ -900,22 +900,6 @@ function return_gateway_groups_array() {
|
||||
return ($gateway_groups_array);
|
||||
}
|
||||
|
||||
/* Update DHCP WAN Interface ip address in gateway group item */
|
||||
function dhclient_update_gateway_groups_defaultroute($interface = "wan") {
|
||||
global $config, $g;
|
||||
foreach($config['gateways']['gateway_item'] as & $gw) {
|
||||
if($gw['interface'] == $interface) {
|
||||
$current_gw = get_interface_gateway($interface);
|
||||
if($gw['gateway'] <> $current_gw) {
|
||||
$gw['gateway'] = $current_gw;
|
||||
$changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($changed && $current_gw)
|
||||
write_config(sprintf(gettext('Updating gateway group gateway for %1$s - new gateway is %2$s'), $interfac, $current_gw));
|
||||
}
|
||||
|
||||
function lookup_gateway_ip_by_name($name) {
|
||||
|
||||
$gateways_arr = return_gateways_array(false, true);
|
||||
@ -1060,33 +1044,6 @@ function validate_address_family($ipaddr, $gwname) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* check if a interface is part of a gateway group */
|
||||
function interface_gateway_group_member($interface) {
|
||||
global $config;
|
||||
|
||||
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];
|
||||
if ($interface == $gateways_arr[$gwname]['interface']) {
|
||||
unset($gateways_arr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($gateways_arr);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function gateway_is_gwgroup_member($name) {
|
||||
global $config;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user