diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2020-05-19 04:26:53 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2020-05-16 04:47:43 +0200 |
commit | 78769ea20595351136cff1fcf3ce0448b0cd4e21 (patch) | |
tree | c45a3c8b6bbe1132c029273a66be0d1a088331cf /ripngd | |
parent | zebra: skip link-local routes when iterating over the RIB using the NB (diff) | |
download | frr-78769ea20595351136cff1fcf3ce0448b0cd4e21.tar.xz frr-78769ea20595351136cff1fcf3ce0448b0cd4e21.zip |
zebra: optimize the RIB get_next() callback
When fetching the next route node in the RIB, skip the empty ones
to avoid calling other northbound callbacks later unnecessarily.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripngd')
-rw-r--r-- | ripngd/ripng_nb_state.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ripngd/ripng_nb_state.c b/ripngd/ripng_nb_state.c index 926573b40..02a00ac42 100644 --- a/ripngd/ripng_nb_state.c +++ b/ripngd/ripng_nb_state.c @@ -144,6 +144,7 @@ ripngd_instance_state_routes_route_get_next(struct nb_cb_get_next_args *args) rn = agg_route_top(ripng->table); else rn = agg_route_next((struct agg_node *)args->list_entry); + /* Optimization: skip empty route nodes. */ while (rn && rn->info == NULL) rn = agg_route_next(rn); |