From: Renato Westphal Date: Tue, 22 Aug 2017 13:52:07 +0000 (-0300) Subject: zebra: fix display of static routes pointing to nonexistent interfaces X-Git-Tag: frr-4.0-dev~385^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b81ef7b30a074ab6f90446e595a7ef4aefc75fad;p=matthieu%2Ffrr.git zebra: fix display of static routes pointing to nonexistent interfaces Bug introduced a couple of weeks ago by myself. Only happens when the route has an IP nexthop + a nexthop interface. Example: debian(config)# ip route 10.0.1.0/24 172.16.1.10 fake1 debian(config)# do sh run Building configuration... [snip] ! ip route 10.0.1.0/24 172.16.1.10 unknown ! end Signed-off-by: Renato Westphal --- diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index f01f037ed5..9f887e8401 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1705,16 +1705,14 @@ static int static_config(struct vty *vty, afi_t afi, safi_t safi, inet_ntop(AF_INET, &si->addr.ipv4, buf, sizeof buf), - ifindex2ifname(si->ifindex, - si->vrf_id)); + si->ifname); break; case STATIC_IPV6_GATEWAY_IFNAME: vty_out(vty, " %s %s", inet_ntop(AF_INET6, &si->addr.ipv6, buf, sizeof buf), - ifindex2ifname(si->ifindex, - si->vrf_id)); + si->ifname); break; }