summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_nb_state.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-10-22 13:28:13 +0200
committerChristian Hopps <chopps@labn.net>2023-12-28 18:53:40 +0100
commitc521d45b37303a73efd99c42ebab20c504c7a6d0 (patch)
tree8ef72dd37adccd017f089032fa70373f4d578aec /zebra/zebra_nb_state.c
parentzebra: support yielding between oper state routes query (diff)
downloadfrr-c521d45b37303a73efd99c42ebab20c504c7a6d0.tar.xz
frr-c521d45b37303a73efd99c42ebab20c504c7a6d0.zip
zebra: fix oper-state walk bug
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'zebra/zebra_nb_state.c')
-rw-r--r--zebra/zebra_nb_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/zebra_nb_state.c b/zebra/zebra_nb_state.c
index d355f3e3e..00df9bfc5 100644
--- a/zebra/zebra_nb_state.c
+++ b/zebra/zebra_nb_state.c
@@ -169,7 +169,8 @@ const void *lib_vrf_zebra_ribs_rib_get_next(struct nb_cb_get_next_args *args)
} else {
zrt = RB_NEXT(zebra_router_table_head, zrt);
/* vrf_id/ns_id do not match, only walk for the given VRF */
- while (zrt && zrt->ns_id != zvrf->zns->ns_id)
+ while (zrt && (zrt->tableid != zvrf->table_id ||
+ zrt->ns_id != zvrf->zns->ns_id))
zrt = RB_NEXT(zebra_router_table_head, zrt);
}