summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/inc
diff options
context:
space:
mode:
authorSimon Rettberg2016-08-15 15:14:23 +0200
committerSimon Rettberg2016-08-15 15:14:23 +0200
commit9cd15bf349c86fe72b80664f8bd1268b872f72c4 (patch)
tree96db9a2644550d6c6e78171ae7f3bf852ebab89b /modules-available/locations/inc
parentUpdate translations (diff)
downloadslx-admin-9cd15bf349c86fe72b80664f8bd1268b872f72c4.tar.gz
slx-admin-9cd15bf349c86fe72b80664f8bd1268b872f72c4.tar.xz
slx-admin-9cd15bf349c86fe72b80664f8bd1268b872f72c4.zip
[locations] Fix wrong overlap function for subnet collision detection
Diffstat (limited to 'modules-available/locations/inc')
-rw-r--r--modules-available/locations/inc/location.inc.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules-available/locations/inc/location.inc.php b/modules-available/locations/inc/location.inc.php
index a018208d..71a621db 100644
--- a/modules-available/locations/inc/location.inc.php
+++ b/modules-available/locations/inc/location.inc.php
@@ -362,8 +362,7 @@ class Location
private static function overlap($net1, $net2)
{
- return ($net1['startaddr'] >= $net2['startaddr'] && $net1['startaddr'] <= $net2['endaddr'])
- || ($net1['endaddr'] >= $net2['startaddr'] && $net1['endaddr'] <= $net2['endaddr']);
+ return ($net1['startaddr'] <= $net2['endaddr'] && $net1['endaddr'] >= $net2['startaddr']);
}
}