Merge pull request #1236 from donaldsharp/interface_startup

zebra: Do not allow same rib_dest_t be queued multiple times to meta …
This commit is contained in:
Renato Westphal 2017-09-28 22:04:02 -03:00 committed by GitHub
commit c00ad29fc4
2 changed files with 11 additions and 0 deletions

View File

@ -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.

View File

@ -2500,6 +2500,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