bgpd: Display BGP paths with unreachable nexthops as invalid

If a BGP path has an unreachable nexthop display that path as invalid

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 72e1005..93902de 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -5845,7 +5845,8 @@
     vty_out (vty, "S");
   else if (binfo->extra && binfo->extra->suppress)
     vty_out (vty, "s");
-  else if (! CHECK_FLAG (binfo->flags, BGP_INFO_HISTORY))
+  else if (CHECK_FLAG (binfo->flags, BGP_INFO_VALID) &&
+           ! CHECK_FLAG (binfo->flags, BGP_INFO_HISTORY))
     vty_out (vty, "*");
   else
     vty_out (vty, " ");
@@ -6305,7 +6306,9 @@
       if (attr->extra && attr->extra->weight != 0)
 	vty_out (vty, ", weight %u", attr->extra->weight);
 	
-      if (! CHECK_FLAG (binfo->flags, BGP_INFO_HISTORY))
+      if (! CHECK_FLAG (binfo->flags, BGP_INFO_VALID))
+	vty_out (vty, ", invalid");
+      else if (! CHECK_FLAG (binfo->flags, BGP_INFO_HISTORY))
 	vty_out (vty, ", valid");
 
       if (binfo->peer != bgp->peer_self)