aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-01-07 21:35:35 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-01-24 01:52:49 +0200
commit7729c25590363a442cf236d0b1160323338dee01 (patch)
treebd9cd72e4802d5e102cdbf6fbe836285e2a10d34
parent5c1f829e1291f6465071c7109f2ab82e825d01c1 (diff)
downloadawall-7729c25590363a442cf236d0b1160323338dee01.tar.bz2
awall-7729c25590363a442cf236d0b1160323338dee01.tar.xz
Filter: pass action
-rw-r--r--README.md5
-rw-r--r--awall/modules/filter.lua3
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 25644e2..7369dd0 100644
--- a/README.md
+++ b/README.md
@@ -291,7 +291,7 @@ definitions. If the value of the **log** attribute is **true**
(boolean), logging is done using default settings. If the value is
**false** (boolean), logging is disabled for the rule. If **log** is
not defined, logging is done using the default settings except for
-accept rules, for which logging is omitted.
+accept and pass rules, for which logging is omitted.
Default logging settings can be set by defining a logging class named
**_default**. Normally, default logging uses the **log** mode with
@@ -388,6 +388,9 @@ which can be one of the following:
for the matching packets.)
</td>
</tr>
+ <tr>
+ <td><strong>pass</strong></td><td>No action</td>
+ </tr>
</tbody>
</table>
diff --git a/awall/modules/filter.lua b/awall/modules/filter.lua
index 4efde86..bf34b56 100644
--- a/awall/modules/filter.lua
+++ b/awall/modules/filter.lua
@@ -168,7 +168,7 @@ function LoggingRule:logchain(log, action, target)
local chain = self:uniqueid('log'..action)
local ofrags = log:optfrags()
- table.insert(ofrags, {target=target})
+ if target then table.insert(ofrags, {target=target}) end
return combinations({{chain=chain}}, ofrags), chain
end
@@ -335,6 +335,7 @@ function Filter:logdefault()
end
function Filter:actiontarget()
+ if self.action == 'pass' then return end
if self.action ~= 'accept' and not self:logdefault() then
self:error('Invalid filter action: '..self.action)
end