Commit 0254cee7 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen
Browse files

fix action chain collection

parent 0c4bdcd0
--[[ --[[
Alpine Wall main module Alpine Wall main module
Copyright (C) 2012-2014 Kaarle Ritvanen Copyright (C) 2012-2016 Kaarle Ritvanen
See LICENSE file for license details See LICENSE file for license details
]]-- ]]--
...@@ -13,7 +13,9 @@ local IPSet = require('awall.ipset') ...@@ -13,7 +13,9 @@ local IPSet = require('awall.ipset')
local IPTables = require('awall.iptables').IPTables local IPTables = require('awall.iptables').IPTables
local optfrag = require('awall.optfrag') local optfrag = require('awall.optfrag')
M.PolicySet = require('awall.policy') M.PolicySet = require('awall.policy')
local util = require('awall.util') local util = require('awall.util')
local extend = util.extend
local posix = require('posix') local posix = require('posix')
...@@ -34,10 +36,7 @@ function M.loadmodules(path) ...@@ -34,10 +36,7 @@ function M.loadmodules(path)
local export = mod.export or {} local export = mod.export or {}
for name, target in pairs(export) do events[name] = target end for name, target in pairs(export) do events[name] = target end
for name, opts in pairs(mod.achains or {}) do extend(achains, mod.achains)
assert(not achains[name])
achains[name] = opts
end
return util.keys(export) return util.keys(export)
end end
...@@ -59,7 +58,7 @@ function M.loadmodules(path) ...@@ -59,7 +58,7 @@ function M.loadmodules(path)
local imported = {} local imported = {}
for i, name in ipairs(modules) do for i, name in ipairs(modules) do
util.extend(imported, readmetadata(require(name))) extend(imported, readmetadata(require(name)))
end end
assert(chdir(cdir)) assert(chdir(cdir))
......
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