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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 23 Apr 2019 09:16:13 +0200
From:   Thomas Haller <thaller@...hat.com>
To:     netdev@...r.kernel.org
Cc:     stephen@...workplumber.org, Thomas Haller <thaller@...hat.com>
Subject: [PATCH 2/4] iprule: avoid trailing space in print_rule() after printing protocol

It seems print_rule() tries to avoid a trailing space at the end
of the line. At least, when printing details about the actions,
they no longer append the space. Probably expecting to be the
last attribute that will be printed.

Don't let the protocol add the trailing space. The space at the end
of the line should be printed consistently (or not).

Signed-off-by: Thomas Haller <thaller@...hat.com>
---
 ip/iprule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ip/iprule.c b/ip/iprule.c
index 2479c3ab..ce6b7cd3 100644
--- a/ip/iprule.c
+++ b/ip/iprule.c
@@ -468,7 +468,7 @@ int print_rule(struct nlmsghdr *n, void *arg)
 		__u8 protocol = rta_getattr_u8(tb[FRA_PROTOCOL]);
 
 		if ((protocol && protocol != RTPROT_KERNEL) || show_details > 0) {
-			print_string(PRINT_ANY, "protocol", " proto %s ",
+			print_string(PRINT_ANY, "protocol", " proto %s",
 				     rtnl_rtprot_n2a(protocol, b1, sizeof(b1)));
 		}
 	}
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ