[quagga-dev 10575] [PATCH 2/5] zebra: handle blackholes encountered in recursive resolution

Christian Franke chris at opensourcerouting.org
Fri Jul 5 17:35:38 BST 2013


Signed-off-by: Christian Franke <chris at opensourcerouting.org>
---
 zebra/zebra_rib.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index e39976e..301e0cc 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. */
-- 
1.7.10.4





More information about the Quagga-dev mailing list