mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 10:04:41 +00:00
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:
parent
a57372aaa0
commit
48c6390caf
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user