Blame SOURCES/firewalld-0.4.4.6-core-Log-unsupported-ICMP-types-as-informational-onl.patch

843f86
From a6f0c40b24ad977d7e32e4fd9cf87b57381f5e83 Mon Sep 17 00:00:00 2001
843f86
From: Phil Sutter <psutter@redhat.com>
843f86
Date: Tue, 12 Sep 2017 01:13:55 +0200
843f86
Subject: [PATCH 2/5] core: Log unsupported ICMP types as informational only
843f86
843f86
iptables-1.4 lacks support for a number of ICMPv6 types. Since this is
843f86
not a problem per se, avoid unnecessarily alerting the user with two
843f86
warning messages for each of them. Instead, make these informational
843f86
messages only so the default configuration does not emit them.
843f86
843f86
Fixes: RHBZ#1479951
843f86
Signed-off-by: Phil Sutter <psutter@redhat.com>
843f86
---
843f86
 src/firewall/core/fw.py          | 2 +-
843f86
 src/firewall/core/fw_icmptype.py | 2 +-
843f86
 2 files changed, 2 insertions(+), 2 deletions(-)
843f86
843f86
diff --git a/src/firewall/core/fw.py b/src/firewall/core/fw.py
843f86
index bc6ffe2dbc238..0dda11d49116a 100644
843f86
--- a/src/firewall/core/fw.py
843f86
+++ b/src/firewall/core/fw.py
843f86
@@ -502,7 +502,7 @@ class Firewall(object):
843f86
                     try:
843f86
                         self.icmptype.add_icmptype(obj)
843f86
                     except FirewallError as error:
843f86
-                        log.warning("%s: %s, ignoring for run-time." % \
843f86
+                        log.info1("%s: %s, ignoring for run-time." % \
843f86
                                     (obj.name, str(error)))
843f86
                     # add a deep copy to the configuration interface
843f86
                     self.config.add_icmptype(copy.deepcopy(obj))
843f86
diff --git a/src/firewall/core/fw_icmptype.py b/src/firewall/core/fw_icmptype.py
843f86
index 5bf1c7fe512c6..afe9f91d6bf6e 100644
843f86
--- a/src/firewall/core/fw_icmptype.py
843f86
+++ b/src/firewall/core/fw_icmptype.py
843f86
@@ -67,7 +67,7 @@ class FirewallIcmpType(object):
843f86
             else:
843f86
                 supported_icmps = [ ]
843f86
             if obj.name.lower() not in supported_icmps:
843f86
-                log.warning("ICMP type '%s' is not supported by the kernel for %s." % (obj.name, ipv))
843f86
+                log.info1("ICMP type '%s' is not supported by the kernel for %s." % (obj.name, ipv))
843f86
                 ipvs.remove(ipv)
843f86
         if len(ipvs) != len(orig_ipvs):
843f86
             if len(ipvs) < 1:
843f86
-- 
843f86
2.13.1
843f86