summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2019-07-29 12:31:03 -0400
committerGitHub <noreply@github.com>2019-07-29 12:31:03 -0400
commit2816a8799d62d375efbb5f89d9ef6939432bdf46 (patch)
tree01b587bb4cb1fe3d6c83ed6bd1dc795df8102831
parenta6ffcbdca63db2a179693158319a2862082a098e (diff)
parent6d0ee6a0d44d2647c3daa96829a494b7f31a7809 (diff)
Merge pull request #4736 from dslicenc/zebra-skip-queued-entry
zebra: skip queued entries when resolving nexthop
-rw-r--r--zebra/zebra_rib.c1
-rw-r--r--zebra/zebra_rnh.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index afe59b9593..b523d54012 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -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))
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 6f65f8ab7a..7b5459f1ec 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -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.
*/