Commit 2b53b6eb authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

PartialIPTables.flush: flush only tables known to kernel

parent 1b24c7d3
......@@ -170,7 +170,8 @@ end
function M.PartialIPTables:flush()
for _, family in ipairs(actfamilies()) do
local cmd = families[family].cmd
for tbl, _ in pairs(builtin) do
for tbl in io.lines(families[family].procfile) do
if builtin[tbl] then
local pid, stdin, stdout = lpc.run(cmd, '-t', tbl, '-S')
stdin:close()
local chains = {}
......@@ -195,6 +196,7 @@ function M.PartialIPTables:flush()
end
end
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment