diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-07-13 13:16:20 +0000 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-07-13 13:16:20 +0000 |
commit | 044a5efcdf3cc76cba012d9a4984a46c0f29c0ba (patch) | |
tree | 41a149fbf636ae15feaf86522ede435f86508d6e | |
parent | da7f4cb2b03eed2999c7b76dc05a6e6eff8ab511 (diff) | |
download | awall-044a5efcdf3cc76cba012d9a4984a46c0f29c0ba.tar.bz2 awall-044a5efcdf3cc76cba012d9a4984a46c0f29c0ba.tar.xz |
Config.input renamed to Config.objects
-rw-r--r-- | awall/init.lua | 12 | ||||
-rw-r--r-- | awall/model.lua | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/awall/init.lua b/awall/init.lua index 8ec2797..d89098a 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 179f0e1..6f08409 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 |