diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-01-07 21:35:35 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-01-24 01:52:49 +0200 |
commit | 7729c25590363a442cf236d0b1160323338dee01 (patch) | |
tree | bd9cd72e4802d5e102cdbf6fbe836285e2a10d34 | |
parent | 5c1f829e1291f6465071c7109f2ab82e825d01c1 (diff) | |
download | awall-7729c25590363a442cf236d0b1160323338dee01.tar.bz2 awall-7729c25590363a442cf236d0b1160323338dee01.tar.xz |
Filter: pass action
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | awall/modules/filter.lua | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -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 |