]> git.proxmox.com Git - mirror_iproute2.git/commit
iproute: Parse last nexthop in a multipath route
authorIdo Schimmel <idosch@mellanox.com>
Tue, 1 May 2018 13:16:35 +0000 (16:16 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 2 May 2018 02:29:44 +0000 (19:29 -0700)
commitc0ec7c9f875cd0d385497bc5e18f0a32e7887663
treef28d8941a739d4b4ca8044e01f33ad32489c35ef
parent37bf5c6fcb88d2e21bbf3b2b021d52a04fd1a18a
iproute: Parse last nexthop in a multipath route

Continue parsing a multipath payload as long as another nexthop can fit
in the payload.

# ip route add 192.0.2.0/24 nexthop dev dummy0 nexthop dev dummy1

Before:
# ip route show 192.0.2.0/24
192.0.2.0/24
        nexthop dev dummy0 weight 1

After:
# ip route show 192.0.2.0/24
192.0.2.0/24
        nexthop dev dummy0 weight 1
        nexthop dev dummy1 weight 1

Fixes: f48e14880a0e ("iproute: refactor multipath print")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/iproute.c