From: Daniel Walton <[email protected]>

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

Signed-off-by: Daniel Walton <[email protected]>
---
 bgpd/bgp_route.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 972ec0e..126dc11 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -5813,7 +5813,8 @@ route_vty_short_status_out (struct vty *vty, struct 
bgp_info *binfo)
     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, " ");
@@ -6237,7 +6238,9 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, 
struct prefix *p,
       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)
-- 
1.9.1


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to