Routing, gateways. ditch now used lookup_gateway_ip_by_name() for https://github.com/opnsense/core/issues/2279

This commit is contained in:
Ad Schellevis 2019-04-12 15:06:19 +02:00
parent 49388ca2c6
commit 73ee4446d5

View File

@ -717,22 +717,6 @@ function return_gateway_groups_array()
return $gateway_groups_array;
}
function lookup_gateway_ip_by_name($name)
{
$gateways_arr = return_gateways_array(true, true);
foreach ($gateways_arr as $gname => $gw) {
if ($gw['name'] === $name || $gname === $name) {
if (is_linklocal($gw['gateway']) && strpos($gw['gateway'], '%') === false) {
$gw['gateway'] .= "%{$gw['interface']}";
}
return $gw['gateway'];
}
}
return false;
}
function lookup_gateway_interface_by_name($name)
{
$gateways_arr = return_gateways_array(false, true);