Commit 042941cd authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(interfaces.inc) move single used find_interface_subnetv6() into get_interface_subnetv6()

(cherry picked from commit ffbb29e4)
parent de06bf97
......@@ -4407,17 +4407,6 @@ function find_interface_subnet($interface)
return null;
}
function find_interface_subnetv6($interface)
{
$interface = trim($interface);
if (does_interface_exist($interface)) {
$ifinfo = legacy_get_interface_addresses($interface);
if (isset($ifinfo['subnetbits6'])) {
return $ifinfo['subnetbits6'];
}
}
return null;
}
function ip_in_interface_alias_subnet($interface, $ipalias)
{
......@@ -4562,9 +4551,11 @@ function get_interface_subnetv6($interface = "wan")
}
}
$cursn = find_interface_subnetv6($realif);
if (!empty($cursn)) {
return $cursn;
if (does_interface_exist($realif)) {
$ifinfo = legacy_get_interface_addresses($realif);
if (isset($ifinfo['subnetbits6'])) {
return $ifinfo['subnetbits6'];
}
}
return null;
......
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