diff options
author | Simon Rettberg | 2016-08-15 15:14:23 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-08-15 15:14:23 +0200 |
commit | 9cd15bf349c86fe72b80664f8bd1268b872f72c4 (patch) | |
tree | 96db9a2644550d6c6e78171ae7f3bf852ebab89b /modules-available/locations/inc | |
parent | Update translations (diff) | |
download | slx-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.php | 3 |
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']); } } |