]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip route: Add missing space between nexthop and via for mpls multipath routes
authorDavid Ahern <dsa@cumulusnetworks.com>
Fri, 17 Mar 2017 23:39:14 +0000 (16:39 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 20 Mar 2017 17:14:44 +0000 (10:14 -0700)
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 <dsa@cumulusnetworks.com>
ip/iproute.c

index a7296dca8b9109daadf4a4556957c4b64101bd28..7cdf0726feb371fab1f5fefc558b950fd1341e85 100644 (file)
@@ -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));
                                }