]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: handle blackholes encountered in recursive resolution
authorChristian Franke <chris@opensourcerouting.org>
Fri, 5 Jul 2013 15:35:38 +0000 (15:35 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 19 Sep 2013 16:04:40 +0000 (18:04 +0200)
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
zebra/zebra_rib.c

index e39976ee55e065c711f06f3f2d4e0bd815cda071..301e0cc1dbdd1291f5b6c567c0dfbce86836ced1 100644 (file)
@@ -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. */