From 2677020cd629eace8ceb27510d8bf92f35cef49d Mon Sep 17 00:00:00 2001 From: arnova Date: Wed, 2 Aug 2023 09:21:27 +0200 Subject: [PATCH] changed: With iptables4/6-tables-restore also filter legacy messages on stderr --- share/arno-iptables-firewall/environment | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/arno-iptables-firewall/environment b/share/arno-iptables-firewall/environment index c6a038e..1be942c 100644 --- a/share/arno-iptables-firewall/environment +++ b/share/arno-iptables-firewall/environment @@ -410,8 +410,8 @@ ip4tables_restore() RULE_WARNING=$((RULE_WARNING + 1)) elif [ -n "$err_result" ]; then - # ip4tables_restore returned success, so normal output of stderr - echo "$err_result" >&2 + # ip4tables_restore returned success, so normal output of stderr but filter some messages + echo "$err_result" |grep -v -e 'WARNING:.*match is obsolete' -e 'iptables-legacy tables present' >&2 fi return $retval @@ -454,8 +454,8 @@ ip6tables_restore() RULE_WARNING=$((RULE_WARNING + 1)) elif [ -n "$err_result" ]; then - # ip6tables_restore returned success, so normal output of stderr - echo "$err_result" >&2 + # ip6tables_restore returned success, so normal output of stderr but filter some messages + echo "$err_result" |grep -v -e 'WARNING:.*match is obsolete' -e 'iptables-legacy tables present' >&2 fi return $retval