From: Stefan Bader Date: Tue, 28 Aug 2018 14:27:29 +0000 (+0200) Subject: iprule: Fix destination prefix output X-Git-Tag: v4.19.0~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a75322c5a8dee6e1ed0017d76c87ef85c505b98;p=thirdparty%2Fiproute2.git iprule: Fix destination prefix output When adding support for JSON output the new code for printing the destination prefix adds a stray blank character before the bitmask. This causes some user-space parsing to fail. Current output: ...: from x.x.x.x/l to y.y.y.y /l Previous output: ...: from x.x.x.x/l to y.y.y.y/l Fixes: 0dd4ccc5 "iprule: add json support" Signed-off-by: Stefan Bader Acked-by: Luca Boccassi Signed-off-by: Stephen Hemminger --- diff --git a/ip/iprule.c b/ip/iprule.c index 8b9421431..744d6d88e 100644 --- a/ip/iprule.c +++ b/ip/iprule.c @@ -239,7 +239,7 @@ int print_rule(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg) print_string(PRINT_FP, NULL, "to ", NULL); print_color_string(PRINT_ANY, ifa_family_color(frh->family), - "dst", "%s ", dst); + "dst", "%s", dst); if (frh->dst_len != host_len) print_uint(PRINT_ANY, "dstlen", "/%u ", frh->dst_len); else