summaryrefslogtreecommitdiffhomepage
path: root/libs/core
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-08-08 12:26:45 +0000
committerSteven Barth <steven@midlink.org>2008-08-08 12:26:45 +0000
commite080fcebd2396c138d8c916d1cf385a88e0db246 (patch)
tree9a41e995a438d8ac32c9501f44800bf3d0e7d297 /libs/core
parentf4ec942d1bc3d9a6c822c075017cb2949cd8fff5 (diff)
libs/core: Cleaned up luci.sys in favor of the new luci.ip module
Diffstat (limited to 'libs/core')
-rw-r--r--libs/core/luasrc/ip.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/core/luasrc/ip.lua b/libs/core/luasrc/ip.lua
index 855bc4a81..68ac384dc 100644
--- a/libs/core/luasrc/ip.lua
+++ b/libs/core/luasrc/ip.lua
@@ -361,8 +361,8 @@ 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()
+ local mask1 = self:prefix()
+ local mask2 = addr:prefix()
if mask1 <= mask2 then
return self:mask(addr:prefix()) == mask2
end