mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 02:25:05 +00:00
interfaces: keep get_failover_interface() for now, mixed plugins env possible
This commit is contained in:
parent
241716e8a7
commit
d6324fc822
@ -4153,6 +4153,31 @@ function interfaces_staticarp_configure($if)
|
||||
}
|
||||
}
|
||||
|
||||
/* XXX this function is unused and to be removed on our way to 19.7 */
|
||||
function get_failover_interface($interface, $family = 'all')
|
||||
{
|
||||
global $config;
|
||||
|
||||
/* shortcut for known interfaces */
|
||||
if (isset($config['interfaces'][$interface])) {
|
||||
return get_real_interface($interface, $family);
|
||||
}
|
||||
|
||||
/* compare against gateway groups */
|
||||
$a_groups = return_gateway_groups_array();
|
||||
if (isset($a_groups[$interface])) {
|
||||
/* we found a gateway group, fetch the interface or vip */
|
||||
if ($a_groups[$interface][0]['vip'] != '') {
|
||||
return $a_groups[$interface][0]['vip'];
|
||||
} else {
|
||||
return $a_groups[$interface][0]['int'];
|
||||
}
|
||||
}
|
||||
|
||||
/* fall through to get real interface the hard way */
|
||||
return get_real_interface($interface, $family);
|
||||
}
|
||||
|
||||
//returns interface information
|
||||
function get_interfaces_info()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user