* [PATCH] iprule: Fix destination prefix output
@ 2018-08-28 14:27 Stefan Bader
2018-08-28 15:38 ` Luca Boccassi
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Bader @ 2018-08-28 14:27 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Luca, Christian Ehrhardt
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 <stefan.bader@canonical.com>
---
ip/iprule.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iprule.c b/ip/iprule.c
index 8b94214..744d6d8 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
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iprule: Fix destination prefix output
2018-08-28 14:27 [PATCH] iprule: Fix destination prefix output Stefan Bader
@ 2018-08-28 15:38 ` Luca Boccassi
0 siblings, 0 replies; 2+ messages in thread
From: Luca Boccassi @ 2018-08-28 15:38 UTC (permalink / raw)
To: Stefan Bader, netdev; +Cc: Stephen Hemminger, Christian Ehrhardt
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
On Tue, 2018-08-28 at 16:27 +0200, Stefan Bader wrote:
> 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 <stefan.bader@canonical.com>
> ---
> ip/iprule.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ip/iprule.c b/ip/iprule.c
> index 8b94214..744d6d8 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
Acked-by: Luca Boccassi <bluca@debian.org>
--
Kind regards,
Luca Boccassi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-28 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-28 14:27 [PATCH] iprule: Fix destination prefix output Stefan Bader
2018-08-28 15:38 ` Luca Boccassi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).