From: Jan Maria Matejka Date: Mon, 3 Dec 2018 13:24:57 +0000 (+0100) Subject: Nest: Get hash chain is not deprecated, it is still useful X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ff9aeb78616de4f4e39904abf0798fd0f1ed205;p=thirdparty%2Fbird.git Nest: Get hash chain is not deprecated, it is still useful --- diff --git a/nest/route.h b/nest/route.h index 61b30f6e9..cb0a70836 100644 --- a/nest/route.h +++ b/nest/route.h @@ -79,7 +79,7 @@ static inline struct fib_node * fib_user_to_node(struct fib *f, void *e) void fib_init(struct fib *f, pool *p, uint addr_type, uint node_size, uint node_offset, uint hash_order, fib_init_fn init); void *fib_find(struct fib *, const net_addr *); /* Find or return NULL if doesn't exist */ -void *fib_get_chain(struct fib *f, const net_addr *a) DEPRECATED; /* Find first node in linked list from hash table */ +void *fib_get_chain(struct fib *f, const net_addr *a); /* Find first node in linked list from hash table */ void *fib_get(struct fib *, const net_addr *); /* Find or create new if nonexistent */ void *fib_route(struct fib *, const net_addr *); /* Longest-match routing lookup */ void fib_delete(struct fib *, void *); /* Remove fib entry */ diff --git a/nest/rt-table.c b/nest/rt-table.c index 3db7d8a77..5a0ef9143 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -101,7 +101,6 @@ net_route_ip6_sadr(rtable *t, net_addr_ip6_sadr *n) match with the smallest matching src prefix. */ for (fn = fib_get_chain(&t->fib, (net_addr *) n); fn; fn = fn->next) { - /* TODO: This may be more effectively done by searching in the redblack tree. */ net_addr_ip6_sadr *a = (void *) fn->addr; if (net_equal_dst_ip6_sadr(n, a) &&