summaryrefslogtreecommitdiffstats
path: root/iptables-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'iptables-model.lua')
-rw-r--r--iptables-model.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/iptables-model.lua b/iptables-model.lua
index 162c357..06c4915 100644
--- a/iptables-model.lua
+++ b/iptables-model.lua
@@ -249,7 +249,7 @@ function read_chain(tab, chain)
return cfe({ type="group", value=retval, label="Chain" })
end
-function update_chain(chain)
+function update_chain(self, chain)
local success = true
getdetails()
if not details[chain.value.table.value] then
@@ -278,7 +278,7 @@ function update_chain(chain)
return chain
end
-function create_chain(chain)
+function create_chain(self, chain)
local success = true
getdetails()
if not details[chain.value.table.value] then
@@ -488,7 +488,7 @@ function read_rule(tab, chain, pos)
return cfe({ type="group", value=retval, label="Rule" })
end
-function create_rule(rule)
+function create_rule(self, rule)
local success, rule = validate_rule(rule)
if success then
@@ -513,7 +513,7 @@ function create_rule(rule)
return rule
end
-function update_rule(rule)
+function update_rule(self, rule)
local success, rule = validate_rule(rule)
if not tonumber(rule.value.position.value) then
rule.value.position.errtxt = "Must be a number"
@@ -557,15 +557,15 @@ function readrulesfile()
return modelfunctions.getfiledetails(rulesfile)
end
-function updaterulesfile(filedetails)
+function updaterulesfile(self, filedetails)
local rulesfile = format.get_ini_entry(fs.read_file(configfile) or "", "", "IPTABLES_SAVE")
- return modelfunctions.setfiledetails(filedetails, {rulesfile})
+ return modelfunctions.setfiledetails(self, filedetails, {rulesfile})
end
-function get_startstop(clientdata)
+function get_startstop(self, clientdata)
return modelfunctions.get_startstop(servicename)
end
-function startstop_service(startstop, action)
+function startstop_service(self, startstop, action)
return modelfunctions.startstop_service(startstop, action)
end