summaryrefslogtreecommitdiffstats
path: root/awall/modules/notrack.lua
diff options
context:
space:
mode:
Diffstat (limited to 'awall/modules/notrack.lua')
-rw-r--r--awall/modules/notrack.lua24
1 files changed, 2 insertions, 22 deletions
diff --git a/awall/modules/notrack.lua b/awall/modules/notrack.lua
index 4b302fb..4e7d66f 100644
--- a/awall/modules/notrack.lua
+++ b/awall/modules/notrack.lua
@@ -8,36 +8,16 @@ Licensed under the terms of GPL2
module(..., package.seeall)
require 'awall.model'
-require 'awall.util'
local model = awall.model
-local NoTrackRule = model.class(model.Rule)
-
-function NoTrackRule:init(...)
- model.Rule.init(self, unpack(arg))
- for i, dir in ipairs({'in', 'out'}) do
- if awall.util.contains(self[dir], model.fwzone) then
- self:error('Connection tracking bypass rules not allowed for firewall zone')
- end
- end
-end
-
-function NoTrackRule:defaultzones() return {nil} end
-
-function NoTrackRule:checkzoneoptfrag(ofrag)
- if ofrag.out then
- self:error('Cannot specify outbound interface for connection tracking bypass rule')
- end
-end
+local NoTrackRule = model.class(model.ForwardOnlyRule)
function NoTrackRule:table() return 'raw' end
-function NoTrackRule:chain() return 'PREROUTING' end
-
function NoTrackRule:target()
- if self.action then return model.Rule.target(self) end
+ if self.action then return model.ForwardOnlyRule.target(self) end
return 'NOTRACK'
end