[PATCH iproute2] ip route: Add missing space between nexthop and via for mpls multipath routes

Subsystems: the rest

STALE3421d

2 messages, 2 authors, 2017-03-20 · open the first message on its own page

[PATCH iproute2] ip route: Add missing space between nexthop and via for mpls multipath routes

From: David Ahern <hidden>
Date: 2017-03-18 00:15:32

MPLS multipath routes are missing a space between 'nexthop' and 'via':

$ ip -net ns1 -f mpls ro ls
100
	nexthopvia inet 172.16.2.2  dev virt12
	nexthopvia inet 172.16.3.2  dev br0

Add it.

Signed-off-by: David Ahern <redacted>
---
 ip/iproute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iproute.c b/ip/iproute.c
index a7296dca8b91..7cdf0726feb3 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -655,7 +655,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 					size_t len = RTA_PAYLOAD(tb[RTA_VIA]) - 2;
 					struct rtvia *via = RTA_DATA(tb[RTA_VIA]);
 
-					fprintf(fp, "via %s %s ",
+					fprintf(fp, " via %s %s ",
 						family_name(via->rtvia_family),
 						format_host(via->rtvia_family, len, via->rtvia_addr));
 				}
-- 
2.1.4

Re: [PATCH iproute2] ip route: Add missing space between nexthop and via for mpls multipath routes

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2017-03-20 17:48:24

On Fri, 17 Mar 2017 16:39:14 -0700
David Ahern [off-list ref] wrote:
MPLS multipath routes are missing a space between 'nexthop' and 'via':

$ ip -net ns1 -f mpls ro ls
100
	nexthopvia inet 172.16.2.2  dev virt12
	nexthopvia inet 172.16.3.2  dev br0

Add it.

Signed-off-by: David Ahern <redacted>
Applied
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help