|
|
7e752c |
From deef2321cf38ef0314bea307dbc27d376ad39624 Mon Sep 17 00:00:00 2001
|
|
|
7e752c |
From: Phil Sutter <psutter@redhat.com>
|
|
|
7e752c |
Date: Thu, 13 Sep 2018 20:45:38 +0200
|
|
|
7e752c |
Subject: [PATCH] iprule: Fix destination prefix output
|
|
|
7e752c |
|
|
|
7e752c |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1623503
|
|
|
7e752c |
Upstream Status: iproute2.git commit 1a75322c5a8de
|
|
|
7e752c |
|
|
|
7e752c |
commit 1a75322c5a8dee6e1ed0017d76c87ef85c505b98
|
|
|
7e752c |
Author: Stefan Bader <stefan.bader@canonical.com>
|
|
|
7e752c |
Date: Tue Aug 28 16:27:29 2018 +0200
|
|
|
7e752c |
|
|
|
7e752c |
iprule: Fix destination prefix output
|
|
|
7e752c |
|
|
|
7e752c |
When adding support for JSON output the new code for printing
|
|
|
7e752c |
the destination prefix adds a stray blank character before
|
|
|
7e752c |
the bitmask. This causes some user-space parsing to fail.
|
|
|
7e752c |
|
|
|
7e752c |
Current output:
|
|
|
7e752c |
...: from x.x.x.x/l to y.y.y.y /l
|
|
|
7e752c |
Previous output:
|
|
|
7e752c |
...: from x.x.x.x/l to y.y.y.y/l
|
|
|
7e752c |
|
|
|
7e752c |
Fixes: 0dd4ccc5 "iprule: add json support"
|
|
|
7e752c |
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
|
|
|
7e752c |
Acked-by: Luca Boccassi <bluca@debian.org>
|
|
|
7e752c |
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
7e752c |
---
|
|
|
7e752c |
ip/iprule.c | 2 +-
|
|
|
7e752c |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
7e752c |
|
|
|
7e752c |
diff --git a/ip/iprule.c b/ip/iprule.c
|
|
|
7e752c |
index 8b94214..744d6d8 100644
|
|
|
7e752c |
--- a/ip/iprule.c
|
|
|
7e752c |
+++ b/ip/iprule.c
|
|
|
7e752c |
@@ -239,7 +239,7 @@ int print_rule(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
|
|
|
7e752c |
|
|
|
7e752c |
print_string(PRINT_FP, NULL, "to ", NULL);
|
|
|
7e752c |
print_color_string(PRINT_ANY, ifa_family_color(frh->family),
|
|
|
7e752c |
- "dst", "%s ", dst);
|
|
|
7e752c |
+ "dst", "%s", dst);
|
|
|
7e752c |
if (frh->dst_len != host_len)
|
|
|
7e752c |
print_uint(PRINT_ANY, "dstlen", "/%u ", frh->dst_len);
|
|
|
7e752c |
else
|
|
|
7e752c |
--
|
|
|
7e752c |
1.8.3.1
|
|
|
7e752c |
|