mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
system: remove unused check_subnets_overlap()
This commit is contained in:
parent
17134aef77
commit
b1a84fc5b9
@ -949,28 +949,6 @@ function is_alias($name)
|
|||||||
return \OPNsense\Firewall\Util::isAlias($name);
|
return \OPNsense\Firewall\Util::isAlias($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find out whether two subnets overlap */
|
|
||||||
function check_subnets_overlap($subnet1, $bits1, $subnet2, $bits2)
|
|
||||||
{
|
|
||||||
if (!is_numeric($bits1)) {
|
|
||||||
$bits1 = 32;
|
|
||||||
}
|
|
||||||
if (!is_numeric($bits2)) {
|
|
||||||
$bits2 = 32;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($bits1 < $bits2) {
|
|
||||||
$relbits = $bits1;
|
|
||||||
} else {
|
|
||||||
$relbits = $bits2;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sn1 = gen_subnet_mask_long($relbits) & ip2long($subnet1);
|
|
||||||
$sn2 = gen_subnet_mask_long($relbits) & ip2long($subnet2);
|
|
||||||
|
|
||||||
return ($sn1 == $sn2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* compare two IP addresses */
|
/* compare two IP addresses */
|
||||||
function ipcmp($a, $b)
|
function ipcmp($a, $b)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user