From cfe34a316e35a209fcd814ccf3523c262e8d4b0a Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 5 Jul 2010 17:50:19 +0200 Subject: Implements hostcache and recursive next hops. Hostcache is a structure for monitoring changes in a routing table that is used for routes with dynamic/recursive next hops. This is needed for proper iBGP next hop handling. --- nest/rt-attr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nest/rt-attr.c') diff --git a/nest/rt-attr.c b/nest/rt-attr.c index abd49c7..9caee8d 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -671,6 +671,7 @@ rta_lookup(rta *o) r = rta_copy(o); r->hash_key = h; r->aflags = RTAF_CACHED; + rt_lock_hostentry(r->hostentry); rta_insert(r); if (++rta_cache_count > rta_cache_limit) @@ -688,6 +689,7 @@ rta__free(rta *a) if (a->next) a->next->pprev = a->pprev; a->aflags = 0; /* Poison the entry */ + rt_unlock_hostentry(a->hostentry); ea_free(a->eattrs); sl_free(rta_slab, a); } -- cgit v1.2.3