aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--awall/modules/mark.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/awall/modules/mark.lua b/awall/modules/mark.lua
new file mode 100644
index 0000000..135d4b1
--- /dev/null
+++ b/awall/modules/mark.lua
@@ -0,0 +1,27 @@
+--[[
+Packet marking module for Alpine Wall
+Copyright (C) 2012 Kaarle Ritvanen
+Licensed under the terms of GPL2
+]]--
+
+
+module(..., package.seeall)
+
+require 'awall.model'
+
+local model = awall.model
+
+
+local MarkRule = model.class(model.ForwardOnlyRule)
+
+function MarkRule:table() return 'mangle' end
+
+function MarkRule:target()
+ if not self.mark then self:error('Mark not specified') end
+ return 'MARK --set-mark '..self.mark
+end
+
+
+classes = {{'mark', MarkRule}}
+
+defrules = {}