Revision 94eb702f
Added by Stilez y over 9 years ago
src/etc/inc/util.inc | ||
---|---|---|
850 | 850 |
/* find out whether two IPv4/IPv6 CIDR subnets overlap. |
851 | 851 |
Note: CIDR overlap implies one is identical or included so largest sn will be the same */ |
852 | 852 |
function check_subnets_overlap($subnet1, $bits1, $subnet2, $bits2) { |
853 |
if (is_ipaddrv4($ipaddr)) {
|
|
853 |
if (is_ipaddrv4($subnet1)) {
|
|
854 | 854 |
return check_subnetsv4_overlap($subnet1, $bits1, $subnet2, $bits2); |
855 | 855 |
} else { |
856 | 856 |
return check_subnetsv6_overlap($subnet1, $bits1, $subnet2, $bits2); |
Also available in: Unified diff
5 or 6