mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-23 02:01:55 +00:00
Do not assign bucket of any prefix to the root node
This commit is contained in:
parent
b574c62d57
commit
5ef7e9ab37
@ -143,9 +143,6 @@ trie_insert_prefix(const union net_addr_union *addr, struct trie_node * const ro
|
|||||||
const struct net_addr_ip4 * const ip4 = &addr->ip4;
|
const struct net_addr_ip4 * const ip4 = &addr->ip4;
|
||||||
struct trie_node *node = root;
|
struct trie_node *node = root;
|
||||||
|
|
||||||
if (root->bucket == NULL)
|
|
||||||
root->bucket = bucket;
|
|
||||||
|
|
||||||
for (u32 i = 0; i < ip4->pxlen; i++)
|
for (u32 i = 0; i < ip4->pxlen; i++)
|
||||||
{
|
{
|
||||||
u32 bit = (ip4->prefix.addr >> (31 - i)) & 1;
|
u32 bit = (ip4->prefix.addr >> (31 - i)) & 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user