projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libs/sys: fix ip6tables parsing issue
[project/luci.git]
/
libs
/
sys
/
luasrc
/
sys
/
iptparser.lua
diff --git
a/libs/sys/luasrc/sys/iptparser.lua
b/libs/sys/luasrc/sys/iptparser.lua
index
3897014
..
60e4856
100644
(file)
--- a/
libs/sys/luasrc/sys/iptparser.lua
+++ b/
libs/sys/luasrc/sys/iptparser.lua
@@
-215,6
+215,13
@@
function IptParser.resync( self )
end
end
+--- Find the names of all tables.
+-- @return Table of table names.
+function IptParser.tables( self )
+ return self._tables
+end
+
+
--- Find the names of all chains within the given table name.
-- @param table String containing the table name
-- @return Table of chain names in the order they occur.
--- Find the names of all chains within the given table name.
-- @param table String containing the table name
-- @return Table of chain names in the order they occur.
@@
-306,6
+313,11
@@
function IptParser._parse_rules( self )
table.insert(rule_parts, 4, nil)
end
table.insert(rule_parts, 4, nil)
end
+ -- ip6tables opt column is usually zero-width
+ if self._family == 6 then
+ table.insert(rule_parts, 6, "--")
+ end
+
rule_details["table"] = tbl
rule_details["chain"] = self._chain
rule_details["index"] = tonumber(rule_parts[1])
rule_details["table"] = tbl
rule_details["chain"] = self._chain
rule_details["index"] = tonumber(rule_parts[1])