mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
Routing, gateways. ditch now used lookup_gateway_ip_by_name() for https://github.com/opnsense/core/issues/2279
This commit is contained in:
parent
49388ca2c6
commit
73ee4446d5
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user