Blob Blame History Raw
From 8b332eae015f215f9db3f2cd2961ebfcec9e2b1a Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Tue, 4 Feb 2020 13:12:31 -0500
Subject: [PATCH 34/35] fix: firewall-offline-cmd: Don't print warning about
 AllowZoneDrifting

If we're called from firewall-offline-cmd, don't log the warning. It's
overly verbose to warn on every invocation.

Fixes: afadd377b09d ("feat: AllowZoneDrifting config option")
(cherry picked from commit eefcb1a712ffca5e08dcefa6aa17c935c16b835f)
(cherry picked from commit b6d3bd4c4359523b483eb630f9265cc4cbe408f2)
---
 src/firewall/core/fw.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/firewall/core/fw.py b/src/firewall/core/fw.py
index 07bc9f375771..969052bd92bd 100644
--- a/src/firewall/core/fw.py
+++ b/src/firewall/core/fw.py
@@ -331,10 +331,11 @@ class Firewall(object):
                     self._allow_zone_drifting = False
                 else:
                     self._allow_zone_drifting = True
-                    log.warning("AllowZoneDrifting is enabled. This is considered "
-                                "an insecure configuration option. It will be "
-                                "removed in a future release. Please consider "
-                                "disabling it now.")
+                    if not self._offline:
+                        log.warning("AllowZoneDrifting is enabled. This is considered "
+                                    "an insecure configuration option. It will be "
+                                    "removed in a future release. Please consider "
+                                    "disabling it now.")
                 log.debug1("AllowZoneDrifting is set to '%s'",
                            self._allow_zone_drifting)
 
-- 
2.23.0