]> git.puffer.fish Git - mirror/frr.git/commitdiff
BGP peers remain in active while rdnbrd is running.
authorDaniel Walton <dwalton@cumulusnetworks.com>
Mon, 25 Apr 2016 20:19:08 +0000 (20:19 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Mon, 25 Apr 2016 20:19:08 +0000 (20:19 +0000)
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-7789, CM-8806

If the route-map for an "ip import-table" denied a route it only flagged
the nexthop as inactive, it did not actually delete the route. This
breaks all directly connected EBGP peers that peer via IPv4 because NHT
finds this /32 with an inactive nexthop.

zebra/zebra_rib.c

index 0c7dd57911fb537e3be685a8e66fb087dee1ccfb..1cd28d75ca6ae7d9cb610724ea64d8be84cad1a2 100644 (file)
@@ -1347,10 +1347,28 @@ rib_process (struct route_node *rn)
        * recursive NHs.
        */
       if (!CHECK_FLAG(rib->flags, ZEBRA_FLAG_CHANGED) &&
-         ! nexthop_active_update (rn, rib, 0))
-        continue;
+          ! nexthop_active_update (rn, rib, 0))
+        {
+          if (rib->type == ZEBRA_ROUTE_TABLE)
+            {
+              /* This entry was denied by the 'ip protocol table' route-map, we
+               * need to delete it */
+             if (rib != fib)
+               {
+                 if (IS_ZEBRA_DEBUG_RIB)
+                   zlog_debug ("%s: %s/%d: imported via import-table but denied "
+                               "by the ip protocol table route-map",
+                               __func__, buf, rn->p.prefixlen);
+                 rib_unlink (rn, rib);
+               }
+             else
+               del = rib;
+            }
+
+          continue;
+        }
 
-      /* Infinit distance. */
+      /* Infinite distance. */
       if (rib->distance == DISTANCE_INFINITY)
         {
           UNSET_FLAG (rib->flags, ZEBRA_FLAG_CHANGED);