summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/rib.h2
-rw-r--r--zebra/zebra_rib.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index 4cc69377d8..fec5c2aacf 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -135,6 +135,8 @@ typedef struct rib_dest_t_ {
} rib_dest_t;
#define RIB_ROUTE_QUEUED(x) (1 << (x))
+// If MQ_SIZE is modified this value needs to be updated.
+#define RIB_ROUTE_ANY_QUEUED 0x1F
/*
* The maximum qindex that can be used.
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index bb49663319..00550fa07d 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2552,6 +2552,15 @@ static void rib_update_table(struct route_table *table,
* the trigger event.
*/
for (rn = route_top(table); rn; rn = srcdest_route_next(rn)) {
+ /*
+ * If we are looking at a route node and the node
+ * has already been queued we don't
+ * need to queue it up again
+ */
+ if (rn->info
+ && CHECK_FLAG(rib_dest_from_rnode(rn)->flags,
+ RIB_ROUTE_ANY_QUEUED))
+ continue;
switch (event) {
case RIB_UPDATE_IF_CHANGE:
/* Examine all routes that won't get processed by the