summaryrefslogtreecommitdiffstats
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-07-05 17:50:19 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-07-05 17:50:19 +0200
commitcfe34a316e35a209fcd814ccf3523c262e8d4b0a (patch)
tree29046cfeb797ade6a3c879b5d58f93cd414ab14d /nest/rt-attr.c
parent824de84d48eff6cbd0c550309fbd0bbf7740cb14 (diff)
downloadbird-cfe34a316e35a209fcd814ccf3523c262e8d4b0a.tar
bird-cfe34a316e35a209fcd814ccf3523c262e8d4b0a.zip
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.
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c2
1 files changed, 2 insertions, 0 deletions
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);
}