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:
7ab501f
)
libs/sys: fix incomplete options table when parsing iptables rules
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 27 Mar 2013 13:28:26 +0000
(13:28 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 27 Mar 2013 13:28:26 +0000
(13:28 +0000)
libs/sys/luasrc/sys/iptparser.lua
patch
|
blob
|
history
diff --git
a/libs/sys/luasrc/sys/iptparser.lua
b/libs/sys/luasrc/sys/iptparser.lua
index 60e485643c4272c9a7ba3551b27589d35000b862..d82363309ac7d7e57793ff603e394f9b5cd693c1 100644
(file)
--- a/
libs/sys/luasrc/sys/iptparser.lua
+++ b/
libs/sys/luasrc/sys/iptparser.lua
@@
-332,8
+332,10
@@
function IptParser._parse_rules( self )
rule_details["destination"] = rule_parts[10]
rule_details["options"] = { }
- for i = 11, #rule_parts - 1 do
- rule_details["options"][i-10] = rule_parts[i]
+ for i = 11, #rule_parts do
+ if #rule_parts[i] > 0 then
+ rule_details["options"][i-10] = rule_parts[i]
+ end
end
self._rules[#self._rules+1] = rule_details