summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index e39976ee..301e0cc1 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -472,6 +472,12 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
}
else
{
+ /* If the longest prefix match for the nexthop yields
+ * a blackhole, mark it as inactive. */
+ if (CHECK_FLAG (match->flags, ZEBRA_FLAG_BLACKHOLE)
+ || CHECK_FLAG (match->flags, ZEBRA_FLAG_REJECT))
+ return 0;
+
if (match->type == ZEBRA_ROUTE_CONNECT)
{
/* Directly point connected route. */
@@ -587,6 +593,12 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
}
else
{
+ /* If the longest prefix match for the nexthop yields
+ * a blackhole, mark it as inactive. */
+ if (CHECK_FLAG (match->flags, ZEBRA_FLAG_BLACKHOLE)
+ || CHECK_FLAG (match->flags, ZEBRA_FLAG_REJECT))
+ return 0;
+
if (match->type == ZEBRA_ROUTE_CONNECT)
{
/* Directly point connected route. */