summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-06-22 09:07:09 -0400
committerTed Trask <ttrask01@yahoo.com>2015-06-22 09:07:09 -0400
commit941f161d0215da4af11a617be20b386580d45bd5 (patch)
tree718e73bde05384910d5f555a22310628a52585b0
parent42476f1a387e8fd61865f23b5d53fa100dcca09b (diff)
downloadacf-iptables-941f161d0215da4af11a617be20b386580d45bd5.tar.bz2
acf-iptables-941f161d0215da4af11a617be20b386580d45bd5.tar.xz
Fix for Lua 5.2 where 'goto' is now a reserved keyword
-rw-r--r--iptables-editrule-html.lsp2
-rw-r--r--iptables-model.lua8
2 files changed, 5 insertions, 5 deletions
diff --git a/iptables-editrule-html.lsp b/iptables-editrule-html.lsp
index 98f3966..aab2cf1 100644
--- a/iptables-editrule-html.lsp
+++ b/iptables-editrule-html.lsp
@@ -26,7 +26,7 @@ htmlviewfunctions.displayformitem(form.value.in_interface)
htmlviewfunctions.displayformitem(form.value.out_interface)
htmlviewfunctions.displayformitem(form.value.source)
htmlviewfunctions.displayformitem(form.value.destination)
-htmlviewfunctions.displayformitem(form.value.goto)
+htmlviewfunctions.displayformitem(form.value["goto"])
htmlviewfunctions.displayformitem(form.value.fragment)
htmlviewfunctions.displayformitem(form.value.set_counters)
htmlviewfunctions.displaysectionend(header_level2)
diff --git a/iptables-model.lua b/iptables-model.lua
index 4eff7ba..4eaee6a 100644
--- a/iptables-model.lua
+++ b/iptables-model.lua
@@ -81,7 +81,7 @@ local function validate_rule(rule)
basiccheck(rule.value.source)
basiccheck(rule.value.destination)
basiccheck(rule.value.jump)
- basiccheck(rule.value.goto)
+ basiccheck(rule.value["goto"])
basiccheck(rule.value.in_interface)
basiccheck(rule.value.out_interface)
if #rule.value.fragment.value > 1 or string.match(rule.value.fragment.value, "[^%+!]") then
@@ -150,7 +150,7 @@ local function generate_rule_specification(rule)
addparameter(rule.value.source.value, "-s", true)
addparameter(rule.value.destination.value, "-d", true)
addparameter(rule.value.jump.value, "-j")
- addparameter(rule.value.goto.value, "-g")
+ addparameter(rule.value["goto"].value, "-g")
addparameter(rule.value.in_interface.value, "-i", true)
addparameter(rule.value.out_interface.value, "-o", true)
if rule.value.fragment.value == "!" then
@@ -327,7 +327,7 @@ function mymodule.read_rule(tab, chain, pos)
retval.source = cfe({ label="Source", descr="A network name or IP address (may have mask of type /xxx.xxx.xxx.xxx or /xx). A '!' before the address specification inverts the sense of the address." })
retval.destination = cfe({ label="Destination", descr="A network name or IP address (may have mask of type /xxx.xxx.xxx.xxx or /xx). A '!' before the address specification inverts the sense of the address." })
retval.jump = cfe({ label="Target", descr="Specify the target of the rule - one of ACCEPT, DROP, QUEUE, or RETURN, or the name of a user-defined chain." })
- retval.goto = cfe({ label="Goto", descr="Processing should continue in the specified chain" })
+ retval["goto"] = cfe({ label="Goto", descr="Processing should continue in the specified chain" })
retval.in_interface = cfe({ label="In Interface", descr="Name of an interface via which a packet was received. A '!' before the interface inverts the sense. A '+' ending the interface will match any interface that begins with this name." })
retval.out_interface = cfe({ label="Out Interface", descr="Name of an interface via which a packet is going to be sent. A '!' before the interface inverts the sense. A '+' ending the interface will match any interface that begins with this name." })
retval.fragment = cfe({ label="Fragment", descr="A '+' specifies the second and further packets of fragmented packets. A '!' specifies only head fragments or unfragmented packets." })
@@ -388,7 +388,7 @@ function mymodule.read_rule(tab, chain, pos)
local i=8
while i <= #words do
if words[i] == "[goto]" then
- retval.goto.value = retval.jump.value
+ retval["goto"].value = retval.jump.value
retval.jump.value = ""
elseif words[i] == "src-type" then
retval.addrtype_src_type.value = words[i+1]