diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-05 17:50:19 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-07-05 17:50:19 +0200 |
commit | cfe34a316e35a209fcd814ccf3523c262e8d4b0a (patch) | |
tree | 29046cfeb797ade6a3c879b5d58f93cd414ab14d /proto/pipe | |
parent | 824de84d48eff6cbd0c550309fbd0bbf7740cb14 (diff) |
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 'proto/pipe')
-rw-r--r-- | proto/pipe/pipe.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index 7fdf2733..e557097d 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -63,6 +63,7 @@ pipe_rt_notify(struct proto *P, rtable *src_table, net *n, rte *new, rte *old, e a.aflags = 0; a.eattrs = attrs; + a.hostentry = NULL; e = rte_get_temp(&a); e->net = nn; e->pflags = 0; @@ -120,7 +121,7 @@ pipe_start(struct proto *P) /* Clean up the secondary stats */ bzero(&p->peer_stats, sizeof(struct proto_stats)); - /* Lock the peer table, unlock is handled in proto_fell_down() */ + /* Lock the peer table, unlock is handled in pipe_cleanup() */ rt_lock_table(p->peer); /* Connect the protocol also to the peer routing table. */ @@ -129,6 +130,13 @@ pipe_start(struct proto *P) return PS_UP; } +static void +pipe_cleanup(struct proto *P) +{ + struct pipe_proto *p = (struct pipe_proto *) P; + rt_unlock_table(p->peer); +} + static struct proto * pipe_init(struct proto_config *C) { @@ -185,6 +193,7 @@ struct protocol proto_pipe = { postconfig: pipe_postconfig, init: pipe_init, start: pipe_start, + cleanup: pipe_cleanup, reconfigure: pipe_reconfigure, get_status: pipe_get_status, }; |