Commit ffbb29e4 authored by Ad Schellevis's avatar Ad Schellevis

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

parent 4461ea23
...@@ -4397,17 +4397,6 @@ function find_interface_subnet($interface) ...@@ -4397,17 +4397,6 @@ function find_interface_subnet($interface)
return null; 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) function ip_in_interface_alias_subnet($interface, $ipalias)
{ {
...@@ -4552,9 +4541,11 @@ function get_interface_subnetv6($interface = "wan") ...@@ -4552,9 +4541,11 @@ function get_interface_subnetv6($interface = "wan")
} }
} }
$cursn = find_interface_subnetv6($realif); if (does_interface_exist($realif)) {
if (!empty($cursn)) { $ifinfo = legacy_get_interface_addresses($realif);
return $cursn; if (isset($ifinfo['subnetbits6'])) {
return $ifinfo['subnetbits6'];
}
} }
return null; 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