Commit a84ff2b1 authored by Ad Schellevis's avatar Ad Schellevis

remove unused functions gwlb.inc

parent 3922acc3
...@@ -900,22 +900,6 @@ function return_gateway_groups_array() { ...@@ -900,22 +900,6 @@ function return_gateway_groups_array() {
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) { function lookup_gateway_ip_by_name($name) {
$gateways_arr = return_gateways_array(false, true); $gateways_arr = return_gateways_array(false, true);
...@@ -1060,33 +1044,6 @@ function validate_address_family($ipaddr, $gwname) { ...@@ -1060,33 +1044,6 @@ function validate_address_family($ipaddr, $gwname) {
return false; 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) { function gateway_is_gwgroup_member($name) {
global $config; global $config;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment