diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-08-08 01:32:55 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-08-08 01:32:55 +0000 |
commit | 9587d9db023db097fbf53e391cf8afbbe9d240fd (patch) | |
tree | 7e0a9ad17687e36d7720da8a6728eaf800cd2a6d /libs/core | |
parent | 12951a951ed4bd326607a7caac4bc031dbe2501c (diff) |
* luci/libs: add assert() to contains() in luci.ip
Diffstat (limited to 'libs/core')
-rw-r--r-- | libs/core/luasrc/ip.lua | 1 |
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 |