From 912994b230fd6e18ce01debbca45c7828e3a15cc Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Wed, 17 May 2017 11:54:19 +0200 Subject: [PATCH] Log: Allow skiping (ignoring) logging classes. In awall you cannot easily disable logging in existing settings. You have to change value of all log attributes in filter/policy/packet-log rules that you want to suppress to false to achieve that. It's bad, because by doing so you lose original logging class association that you've put there. Introducing skip attribute in logging class fixes it. --- README.md | 4 ++++ awall/modules/log.lua | 1 + 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index d9e74889487d..19d7697267da 100644 --- a/README.md +++ b/README.md @@ -275,6 +275,10 @@ logging modes: probability Probability for logging an individual packet (default: 1) + + skip + Ignore current logging class (default: false) + diff --git a/awall/modules/log.lua b/awall/modules/log.lua index 22562284e319..4f91db6ba353 100644 --- a/awall/modules/log.lua +++ b/awall/modules/log.lua @@ -91,6 +91,7 @@ function Log.get(rule, spec, default) if spec == nil then spec = default end if spec == false then return end if spec == true then spec = '_default' end + if rule.root.log[spec].skip == true then return end return rule.root.log[spec] or rule:error('Invalid log: '..spec) end -- 2.11.2