mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-11 03:21:53 +00:00
MRT Table Dump: Skip empty RIB Tables
This commit is contained in:
parent
018dbac0e0
commit
45d8f0f0be
@ -66,13 +66,13 @@ bgp_mrt_table_dump_step(struct mrt_table_dump_ctx *state)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
uint max_work_size = 1;
|
uint max_work_size = 1;
|
||||||
|
u32 original_rib_sequence_number = state->rib_sequence_number;
|
||||||
|
|
||||||
FIB_ITERATE_START(&state->rtable->fib, &state->fit, f)
|
FIB_ITERATE_START(&state->rtable->fib, &state->fit, f)
|
||||||
{
|
{
|
||||||
if (!max_work_size--)
|
if (!max_work_size--)
|
||||||
{
|
{
|
||||||
FIB_ITERATE_PUT(&state->fit, f);
|
FIB_ITERATE_PUT(&state->fit, f);
|
||||||
bgp_mrt_rib_table_dump(state);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,6 +119,11 @@ bgp_mrt_table_dump_step(struct mrt_table_dump_ctx *state)
|
|||||||
|
|
||||||
mrt_rib_table_add_entry(&state->rib_table, &entry);
|
mrt_rib_table_add_entry(&state->rib_table, &entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state->rib_table.entry_count)
|
||||||
|
bgp_mrt_rib_table_dump(state);
|
||||||
|
else
|
||||||
|
state->rib_sequence_number = original_rib_sequence_number;
|
||||||
} FIB_ITERATE_END(f);
|
} FIB_ITERATE_END(f);
|
||||||
|
|
||||||
fit_get(&state->rtable->fib, &state->fit);
|
fit_get(&state->rtable->fib, &state->fit);
|
||||||
|
Loading…
Reference in New Issue
Block a user