projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12951a9
)
* luci/libs: add assert() to contains() in luci.ip
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 8 Aug 2008 01:32:55 +0000
(
01:32
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 8 Aug 2008 01:32:55 +0000
(
01:32
+0000)
libs/core/luasrc/ip.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/ip.lua
b/libs/core/luasrc/ip.lua
index ad32e27c6e31ec849466f52389c5ca4845cf9f6b..855bc4a816258ca57e7c21d71436b6ed4bdfec93 100644
(file)
--- 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