bgpd: don't count a route with an unreachable nexthop in PfxRcd
When a route is received from a peer that we cannot
reach do not count that route as a received route.
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index 2a72daa..332714c 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -139,6 +139,10 @@
u_char tag[3];
};
+#define BGP_INFO_COUNTABLE(BI) \
+ (! CHECK_FLAG ((BI)->flags, BGP_INFO_HISTORY) \
+ && ! CHECK_FLAG ((BI)->flags, BGP_INFO_REMOVED))
+
/* Flags which indicate a route is unuseable in some form */
#define BGP_INFO_UNUSEABLE \
(BGP_INFO_HISTORY|BGP_INFO_DAMPED|BGP_INFO_REMOVED)