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>] [day] [month] [year] [list]
Message-Id: <20220210105152.48904-1-wojciech.drewek@intel.com>
Date:   Thu, 10 Feb 2022 11:51:52 +0100
From:   Wojciech Drewek <wojciech.drewek@...el.com>
To:     netdev@...r.kernel.org
Cc:     dsahern@...il.com, stephen@...workplumber.org
Subject: [PATCH iproute2-next] f_flower: fix indentation for enc_key_id and u32

Commit b2450e46b7b2 ("flower: fix clang warnings") caused enc_key_id
and u32 to be printed without indentation. Fix this by printing two
spaces before calling print_uint_name_value.

Signed-off-by: Wojciech Drewek <wojciech.drewek@...el.com>
---
 tc/f_flower.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tc/f_flower.c b/tc/f_flower.c
index 1ff8341d27a6..b7dc37a112a2 100644
--- a/tc/f_flower.c
+++ b/tc/f_flower.c
@@ -109,6 +109,12 @@ static void print_indent_name_value(const char *name, const char *value)
 	print_string_name_value(name, value);
 }
 
+static void print_uint_indent_name_value(const char *name, uint value)
+{
+	print_string(PRINT_FP, NULL, "  ", NULL);
+	print_uint_name_value(name, value);
+}
+
 static int flower_parse_eth_addr(char *str, int addr_type, int mask_type,
 				 struct nlmsghdr *n)
 {
@@ -2324,7 +2330,7 @@ static void flower_print_key_id(const char *name, struct rtattr *attr)
 		return;
 
 	print_nl();
-	print_uint_name_value(name, rta_getattr_be32(attr));
+	print_uint_indent_name_value(name, rta_getattr_be32(attr));
 }
 
 static void flower_print_geneve_opts(const char *name, struct rtattr *attr,
@@ -2573,7 +2579,7 @@ static void flower_print_u32(const char *name, struct rtattr *attr)
 		return;
 
 	print_nl();
-	print_uint_name_value(name, rta_getattr_u32(attr));
+	print_uint_indent_name_value(name, rta_getattr_u32(attr));
 }
 
 static void flower_print_mpls_opt_lse(struct rtattr *lse)
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ