Blob Blame History Raw
From f32a3617acd884f0a1af8e648fe09fa17ac24193 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Tue, 21 Jul 2020 15:33:37 -0400
Subject: [PATCH 40/45] fix(rich): nftables: log level "warning"

nftables wants the "warn" keyword not "warning".

(cherry picked from commit f622e65783c4d9f6969701a799d13cb8486d1c0f)
(cherry picked from commit 995cde22cced261c558ecad523befe62eb878d05)
---
 src/firewall/core/nftables.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/firewall/core/nftables.py b/src/firewall/core/nftables.py
index 97b1cd9f7f1e..85c790b5b51e 100644
--- a/src/firewall/core/nftables.py
+++ b/src/firewall/core/nftables.py
@@ -993,7 +993,8 @@ class nftables(object):
         if rich_rule.log.prefix:
             log_options["prefix"] = "%s" % rich_rule.log.prefix
         if rich_rule.log.level:
-            log_options["level"] = "%s" % rich_rule.log.level
+            level = "warn" if "warning" == rich_rule.log.level else rich_rule.log.level
+            log_options["level"] = "%s" % level
 
         rule = {"family": "inet",
                 "table": TABLE_NAME,
-- 
2.27.0