0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

tmp: enhancements in trie api changes

This commit is contained in:
Vojtech Vilimek 2023-04-14 11:30:55 +02:00
parent 01e16f0e09
commit 7e68ba64a9
2 changed files with 5 additions and 6 deletions

View File

@ -854,9 +854,8 @@ trie_walk_init(struct f_trie_walk_state *s, const struct f_trie *t, const net_ad
/* Save the last node on the stack otherwise */
else
{
/* Found prefect match, no advancing */
/* Found perfect match, no advancing of stack position */
s->stack[s->stack_pos] = n;
/* Search whole trie except skipped parts */
s->start_pos = 1;
}

View File

@ -911,13 +911,13 @@ t_trie_walk_inclusive(void)
bt_format_net(buf, 64, &px->net);
bt_debug("%s{%d,%d}\n", buf, px->lo, px->hi);
}
*/
/* Full walk */
bt_debug("Full walk inclusive (round %d, %d nets)\n", round, num);
pos = 0;
uint pxc = 0;
/* Last argument should have no effect on the walk */
TRIE_WALK2(trie, net, NULL, 1)
{
log_networks(&net, &pxset[pos].net);
@ -978,9 +978,9 @@ t_trie_walk_inclusive(void)
break;
/* Account for subnets before searched net from */
for (; pos < num; pos++)
if (net_compare(&pxset[pos].net, &from.net) >= 0)
break;
//for (; pos < num; pos++)
//if (net_compare(&pxset[pos].net, &from.net) >= 0)
//break;
int p0 = pos;
char buf0[64];