mirror of
https://github.com/lucaspalomodevelop/opnsense-core.git
synced 2026-03-13 00:07:27 +00:00
system: remove unused subnet_size()
This commit is contained in:
parent
2d1c1fcebe
commit
17134aef77
@ -949,19 +949,6 @@ function is_alias($name)
|
||||
return \OPNsense\Firewall\Util::isAlias($name);
|
||||
}
|
||||
|
||||
function subnet_size($subnet)
|
||||
{
|
||||
if (is_subnetv4($subnet)) {
|
||||
list ($ip, $bits) = explode("/", $subnet);
|
||||
return round(exp(log(2) * (32 - $bits)));
|
||||
} elseif (is_subnetv6($subnet)) {
|
||||
list ($ip, $bits) = explode("/", $subnet);
|
||||
return round(exp(log(2) * (128 - $bits)));
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* find out whether two subnets overlap */
|
||||
function check_subnets_overlap($subnet1, $bits1, $subnet2, $bits2)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user