diff --git a/awall/init.lua b/awall/init.lua index 8ec2797c47c190d51a637f3b5040fd2456f0da60..d89098ad44dced22e532dd3764fe46e29e072743 100644 --- a/awall/init.lua +++ b/awall/init.lua @@ -61,11 +61,11 @@ Config = object.class(object.Object) function Config:init(policyconfig) - self.input = policyconfig:expand() + self.objects = policyconfig:expand() self.iptables = iptables.IPTables.new() local function morph(path, cls) - local objs = self.input[path] + local objs = self.objects[path] if objs then for k, v in pairs(objs) do objs[k] = cls.morph(v, @@ -89,7 +89,7 @@ function Config:init(policyconfig) local function insertdefrules(phase) for i, rulegroup in ipairs(defrules[phase] or {}) do if type(rulegroup) == 'function' then - insertrules(rulegroup(self.input)) + insertrules(rulegroup(self.objects)) else insertrules(rulegroup) end end end @@ -99,8 +99,8 @@ function Config:init(policyconfig) insertdefrules('pre') for i, path in ipairs(procorder) do - if self.input[path] then - for i, rule in ipairs(self.input[path]) do + if self.objects[path] then + for i, rule in ipairs(self.objects[path]) do insertrules(rule:trules()) end end @@ -108,7 +108,7 @@ function Config:init(policyconfig) end morph('ipset', awall.model.ConfigObject) - self.ipset = ipset.IPSet.new(self.input.ipset) + self.ipset = ipset.IPSet.new(self.objects.ipset) end function Config:print() diff --git a/awall/model.lua b/awall/model.lua index 179f0e1b82d62839486cdc35bc9872b5f1506e83..6f084096047c4dbd6f28ea09600459f75593392e 100644 --- a/awall/model.lua +++ b/awall/model.lua @@ -24,7 +24,7 @@ ConfigObject = class(awall.object.Object) function ConfigObject:init(context, location) if context then self.context = context - self.root = context.input + self.root = context.objects end self.location = location end