* isis_lsp.c: Better output of detailed LSP printout and fixed TE IPv4
	  reachibility metric display.
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 26c46a2..d02f383 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -795,7 +795,7 @@
     for (ALL_LIST_ELEMENTS (lsp->tlv_data.is_neighs, lnode, lnnode, is_neigh))
       {
 	lspid_print (is_neigh->neigh_id, LSPid, dynhost, 0);
-	vty_out (vty, "  Metric: %d IS %s%s",
+	vty_out (vty, "  Metric: %-10d IS %s%s",
 		 is_neigh->metrics.metric_default, LSPid, VTY_NEWLINE);
       }
   
@@ -808,7 +808,7 @@
 	      sizeof (ipv4_reach_prefix));
       memcpy (ipv4_reach_mask, inet_ntoa (ipv4_reach->mask),
 	      sizeof (ipv4_reach_mask));
-      vty_out (vty, "  Metric: %d IP %s %s%s",
+      vty_out (vty, "  Metric: %-10d IP-Internal %s %s%s",
 	       ipv4_reach->metrics.metric_default, ipv4_reach_prefix,
 	       ipv4_reach_mask, VTY_NEWLINE);
     }
@@ -822,7 +822,7 @@
 	      sizeof (ipv4_reach_prefix));
       memcpy (ipv4_reach_mask, inet_ntoa (ipv4_reach->mask),
 	      sizeof (ipv4_reach_mask));
-      vty_out (vty, "  Metric: %d IP-External %s %s%s",
+      vty_out (vty, "  Metric: %-10d IP-External %s %s%s",
 	       ipv4_reach->metrics.metric_default, ipv4_reach_prefix,
 	       ipv4_reach_mask, VTY_NEWLINE);
     }
@@ -839,11 +839,11 @@
       inet_ntop (AF_INET6, &in6, (char *)buff, BUFSIZ);
       if ((ipv6_reach->control_info &&
 	   CTRL_INFO_DISTRIBUTION) == DISTRIBUTION_INTERNAL)
-	vty_out (vty, "  Metric: %d IPv6-Intern %s/%d%s",
+	vty_out (vty, "  Metric: %-10d IPv6-Internal %s/%d%s",
 		 ntohl (ipv6_reach->metric),
 		 buff, ipv6_reach->prefix_len, VTY_NEWLINE);
       else
-	vty_out (vty, "  Metric: %d IPv6-Extern %s/%d%s",
+	vty_out (vty, "  Metric: %-10d IPv6-External %s/%d%s",
 		 ntohl (ipv6_reach->metric),
 		 buff, ipv6_reach->prefix_len, VTY_NEWLINE);
     }
@@ -854,10 +854,11 @@
     for (ALL_LIST_ELEMENTS (lsp->tlv_data.te_is_neighs, lnode, 
                             lnnode, te_is_neigh))
     {
-      /* FIXME: metric display is wrong. */
+      uint32_t metric;
+      memcpy (&metric, te_is_neigh->te_metric, 3);
       lspid_print (te_is_neigh->neigh_id, LSPid, dynhost, 0);
-      vty_out (vty, "  Metric: %d extd-IS %s%s",
-	       te_is_neigh->te_metric[0], LSPid, VTY_NEWLINE);
+      vty_out (vty, "  Metric: %-10d IS-Extended %s%s",
+	       ntohl (metric << 8), LSPid, VTY_NEWLINE);
     }
 
   /* TE IPv4 tlv */
@@ -866,7 +867,7 @@
                             lnnode, te_ipv4_reach))
     {
       /* FIXME: There should be better way to output this stuff. */
-      vty_out (vty, "  Metric: %d extd-IP %s/%d%s",
+      vty_out (vty, "  Metric: %-10d IP-Extended %s/%d%s",
 	       ntohl (te_ipv4_reach->te_metric),
 	       inet_ntoa (newprefix2inaddr (&te_ipv4_reach->prefix_start,
 					    te_ipv4_reach->control)),