summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/core/luasrc/ip.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/core/luasrc/ip.lua b/libs/core/luasrc/ip.lua
index ad32e27c6..855bc4a81 100644
--- a/libs/core/luasrc/ip.lua
+++ b/libs/core/luasrc/ip.lua
@@ -360,6 +360,7 @@ function cidr.mask( self, bits )
end
function cidr.contains( self, addr )
+ assert( self[1] == addr[1], "Can't compare IPv4 and IPv6 addresses" )
local mask1 = self:mask()
local mask2 = addr:mask()
if mask1 <= mask2 then