[quagga-dev 10541] [PATCH 1/3] zebra: improve display of NEXTHOP_IPV4_IFINDEX in show ip route

Christian Franke chris at opensourcerouting.org
Sat May 25 16:01:34 BST 2013


Signed-off-by: Christian Franke <chris at opensourcerouting.org>
---
 zebra/zebra_vty.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index d07b09c..a672d42 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -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:
-- 
1.7.10.4





More information about the Quagga-dev mailing list