From e84f00aee61d5055c2da2c9c1aff683f20b84f56 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Tue, 4 Feb 2020 13:12:31 -0500
Subject: [PATCH 38/39] 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 ba1f1a744ca543b4e9359ab26b4b1f9ff70fcb64)
---
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 6206ed586988..ebadd6cce20e 100644
--- a/src/firewall/core/fw.py
+++ b/src/firewall/core/fw.py
@@ -293,10 +293,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