summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--libs/sys/luasrc/sys/iptparser.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/sys/luasrc/sys/iptparser.lua b/libs/sys/luasrc/sys/iptparser.lua
index 484a16fbc..a1d0515af 100644
--- a/libs/sys/luasrc/sys/iptparser.lua
+++ b/libs/sys/luasrc/sys/iptparser.lua
@@ -19,6 +19,8 @@ luci.util = require "luci.util"
luci.sys = require "luci.sys"
luci.ip = require "luci.ip"
+local tonumber, ipairs = tonumber, ipairs
+
--- LuCI iptables parser and query library
-- @cstyle instance
module("luci.sys.iptparser")
@@ -182,7 +184,7 @@ function IptParser.find( self, args )
-- insert match
if match == true then
- table.insert( rv, rule )
+ rv[#rv+1] = rule
end
end
@@ -235,7 +237,7 @@ function IptParser._parse_rules( self )
rule_details["options"][i-10] = rule_parts[i]
end
- table.insert( self._rules, rule_details )
+ self._rules[#self._rules+1] = rule_details
end
end
end