util: turns out we don't need this after all

It was used to validate a defunct subnet with a missing prefix
since there was no IPv6 address on the interface in the first
place.  Offending code already removed.
This commit is contained in:
Franco Fichtner 2018-11-03 09:23:03 +01:00
parent a57372aaa0
commit 48c6390caf

View File

@ -184,14 +184,15 @@ function gen_subnet($ipaddr, $bits)
}
/* return the subnet address given a host address and a subnet bit count */
function gen_subnetv6($ipaddr, $bits, $validate = true)
function gen_subnetv6($ipaddr, $bits)
{
if ($validate && (!is_ipaddrv6($ipaddr) || !is_numeric($bits))) {
return "";
if (!is_ipaddrv6($ipaddr) || !is_numeric($bits)) {
return '';
}
$address = Net_IPv6::getNetmask($ipaddr, $bits);
$address = Net_IPv6::compress($address);
return $address;
}