]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: improve display of NEXTHOP_IPV4_IFINDEX in show ip route
authorChristian Franke <chris@opensourcerouting.org>
Sat, 25 May 2013 14:01:34 +0000 (14:01 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 6 Aug 2013 10:41:46 +0000 (12:41 +0200)
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
zebra/zebra_vty.c

index d07b09c8e04831e0fe5368099d1e0c6f4aecae32..a672d42224726a8aea941bbfa34b411e84a5167d 100644 (file)
@@ -621,7 +621,11 @@ vty_show_ip_route_detail (struct vty *vty, struct route_node *rn)
                {
                case NEXTHOP_TYPE_IPV4:
                case NEXTHOP_TYPE_IPV4_IFINDEX:
-                 vty_out (vty, " via %s)", inet_ntoa (nexthop->rgate.ipv4));
+                 vty_out (vty, " via %s", inet_ntoa (nexthop->rgate.ipv4));
+                 if (nexthop->rifindex)
+                   vty_out (vty, ", %s", ifindex2ifname (nexthop->rifindex));
+                 vty_out (vty, ")");
+
                  break;
                case NEXTHOP_TYPE_IFINDEX:
                case NEXTHOP_TYPE_IFNAME:
@@ -731,7 +735,10 @@ vty_show_ip_route (struct vty *vty, struct route_node *rn, struct rib *rib)
            {
            case NEXTHOP_TYPE_IPV4:
            case NEXTHOP_TYPE_IPV4_IFINDEX:
-             vty_out (vty, " via %s)", inet_ntoa (nexthop->rgate.ipv4));
+             vty_out (vty, " via %s", inet_ntoa (nexthop->rgate.ipv4));
+             if (nexthop->rifindex)
+               vty_out (vty, ", %s", ifindex2ifname (nexthop->rifindex));
+             vty_out (vty, ")");
              break;
            case NEXTHOP_TYPE_IFINDEX:
            case NEXTHOP_TYPE_IFNAME: