Blob Blame History Raw
From a6f0c40b24ad977d7e32e4fd9cf87b57381f5e83 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Tue, 12 Sep 2017 01:13:55 +0200
Subject: [PATCH 2/5] core: Log unsupported ICMP types as informational only

iptables-1.4 lacks support for a number of ICMPv6 types. Since this is
not a problem per se, avoid unnecessarily alerting the user with two
warning messages for each of them. Instead, make these informational
messages only so the default configuration does not emit them.

Fixes: RHBZ#1479951
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
 src/firewall/core/fw.py          | 2 +-
 src/firewall/core/fw_icmptype.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/firewall/core/fw.py b/src/firewall/core/fw.py
index bc6ffe2dbc238..0dda11d49116a 100644
--- a/src/firewall/core/fw.py
+++ b/src/firewall/core/fw.py
@@ -502,7 +502,7 @@ class Firewall(object):
                     try:
                         self.icmptype.add_icmptype(obj)
                     except FirewallError as error:
-                        log.warning("%s: %s, ignoring for run-time." % \
+                        log.info1("%s: %s, ignoring for run-time." % \
                                     (obj.name, str(error)))
                     # add a deep copy to the configuration interface
                     self.config.add_icmptype(copy.deepcopy(obj))
diff --git a/src/firewall/core/fw_icmptype.py b/src/firewall/core/fw_icmptype.py
index 5bf1c7fe512c6..afe9f91d6bf6e 100644
--- a/src/firewall/core/fw_icmptype.py
+++ b/src/firewall/core/fw_icmptype.py
@@ -67,7 +67,7 @@ class FirewallIcmpType(object):
             else:
                 supported_icmps = [ ]
             if obj.name.lower() not in supported_icmps:
-                log.warning("ICMP type '%s' is not supported by the kernel for %s." % (obj.name, ipv))
+                log.info1("ICMP type '%s' is not supported by the kernel for %s." % (obj.name, ipv))
                 ipvs.remove(ipv)
         if len(ipvs) != len(orig_ipvs):
             if len(ipvs) < 1:
-- 
2.13.1