projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
069ac11
)
* luci/libs: fix off-by-one bug in luci.ip
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 8 Aug 2008 12:55:57 +0000
(12:55 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 8 Aug 2008 12:55:57 +0000
(12:55 +0000)
libs/core/luasrc/ip.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/ip.lua
b/libs/core/luasrc/ip.lua
index e6de08f1b2c463db53cbdaf5bcc3bb1d69f03c11..2fe71297d9bcc6c5acc17f040faa95e2bbff28c0 100644
(file)
--- a/
libs/core/luasrc/ip.lua
+++ b/
libs/core/luasrc/ip.lua
@@
-333,7
+333,7
@@
function cidr.network( self, bits )
if #data < #self[2] then
table.insert( data, bit.band( self[2][1+#data], __mask16(bits) ) )
- for i = #data, #self[2] do
+ for i = #data
+ 1
, #self[2] do
table.insert( data, 0 )
end
end