lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220120210646.189197-1-stephen@networkplumber.org>
Date:   Thu, 20 Jan 2022 13:06:46 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     netdev@...r.kernel.org
Cc:     Stephen Hemminger <stephen@...workplumber.org>, jiri@...lanox.com
Subject: [PATCH iproute2] tc/action: print error to stderr

Error messages should go to stderr even if using JSON.

Fixes: 2704bd625583 ("tc: jsonify actions core")
Cc: jiri@...lanox.com
Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
---
 tc/m_action.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tc/m_action.c b/tc/m_action.c
index b16882a345dc..ee32aeda98fd 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -466,10 +466,8 @@ tc_print_action(FILE *f, const struct rtattr *arg, unsigned short tot_acts)
 			print_nl();
 			print_uint(PRINT_ANY, "order",
 				   "\taction order %u: ", i);
-			if (tc_print_one_action(f, tb[i]) < 0) {
-				print_string(PRINT_FP, NULL,
-					     "Error printing action\n", NULL);
-			}
+			if (tc_print_one_action(f, tb[i]) < 0)
+				fprintf(stderr, "Error printing action\n");
 			close_json_object();
 		}
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ