mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
interfaces: now that get_real_interface() always returns...
Prioritize '_vip' fake handling in getting an IP address. It might be better to look it up, but that is for later.
This commit is contained in:
parent
f908748323
commit
2cfcc5f03e
@ -4010,15 +4010,15 @@ function ip_in_interface_alias_subnet($interface, $ipalias)
|
||||
|
||||
function get_interface_ip($interface = 'wan')
|
||||
{
|
||||
if (strstr($interface, '_vip')) {
|
||||
return get_configured_carp_interface_list($interface);
|
||||
}
|
||||
|
||||
$realif = get_real_interface($interface);
|
||||
if ($realif) {
|
||||
return find_interface_ip($realif);
|
||||
}
|
||||
|
||||
if (strstr($interface, '_vip')) {
|
||||
return get_configured_carp_interface_list($interface);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -4026,16 +4026,16 @@ function get_interface_ipv6($interface = 'wan')
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (strstr($interface, '_vip')) {
|
||||
return get_configured_carp_interface_list($interface, 'inet6');
|
||||
}
|
||||
|
||||
$realif = get_real_interface($interface, 'inet6');
|
||||
if ($realif) {
|
||||
return isset($config['interfaces'][$interface]['dhcp6prefixonly']) ?
|
||||
find_interface_ipv6_ll($realif) : find_interface_ipv6($realif);
|
||||
}
|
||||
|
||||
if (strstr($interface, '_vip')) {
|
||||
return get_configured_carp_interface_list($interface, 'inet6');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user