]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: skip queued entries when resolving nexthop
authorDon Slice <dslice@cumulusnetworks.com>
Mon, 1 Jul 2019 17:17:46 +0000 (17:17 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Fri, 26 Jul 2019 17:26:10 +0000 (17:26 +0000)
Problem reported where certain routes were not being passed on to
clients if they were operated on while still queued for kernel
installation.   Changed it to defer working on entries that were
queued to dplane so we could operate on them after getting an
answer back from kernel installatino.

Ticket: CM-25480
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
zebra/zebra_rib.c
zebra/zebra_rnh.c

index afe59b95933483f081ed831abf76203b6e5d078b..b523d540129c0a20e2532b8aef716a4f2e679313 100644 (file)
@@ -1364,6 +1364,7 @@ static void zebra_rib_fixup_system(struct route_node *rn)
                        continue;
 
                SET_FLAG(re->status, ROUTE_ENTRY_INSTALLED);
+               UNSET_FLAG(re->status, ROUTE_ENTRY_QUEUED);
 
                for (ALL_NEXTHOPS(re->ng, nhop)) {
                        if (CHECK_FLAG(nhop->flags, NEXTHOP_FLAG_RECURSIVE))
index 6f65f8ab7a1d917b3b24a4fd2d72c5631d5fb8ad..7b5459f1ec1eb08f1847659d0d64f12d4f760cf9 100644 (file)
@@ -465,6 +465,7 @@ zebra_rnh_resolve_import_entry(struct zebra_vrf *zvrf, afi_t afi,
        RNODE_FOREACH_RE (rn, re) {
                if (!CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED)
                    && CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED)
+                   && !CHECK_FLAG(re->status, ROUTE_ENTRY_QUEUED)
                    && (re->type != ZEBRA_ROUTE_BGP))
                        break;
        }
@@ -679,6 +680,14 @@ zebra_rnh_resolve_nexthop_entry(struct zebra_vrf *zvrf, afi_t afi,
                                continue;
                        }
 
+                       if (CHECK_FLAG(re->status, ROUTE_ENTRY_QUEUED)) {
+                               if (IS_ZEBRA_DEBUG_NHT_DETAILED)
+                                       zlog_debug(
+                                               "\tRoute Entry %s queued",
+                                               zebra_route_string(re->type));
+                               continue;
+                       }
+
                        /* Just being SELECTED isn't quite enough - must
                         * have an installed nexthop to be useful.
                         */