diff options
Diffstat (limited to 'proto')
-rw-r--r-- | proto/pipe/pipe.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index 0612f5f4..c6a8317d 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -1,7 +1,7 @@ /* * BIRD -- Table-to-Table Routing Protocol a.k.a Pipe * - * (c) 1999 Martin Mares <mj@ucw.cz> + * (c) 1999--2000 Martin Mares <mj@ucw.cz> * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -106,10 +106,20 @@ pipe_start(struct proto *P) */ a = proto_add_announce_hook(P, p->peer); a->proto = &ph->p; + rt_lock_table(p->peer); return PS_UP; } +static int +pipe_shutdown(struct proto *P) +{ + struct pipe_proto *p = (struct pipe_proto *) P; + + rt_unlock_table(p->peer); + return PS_DOWN; +} + static struct proto * pipe_init(struct proto_config *C) { @@ -147,5 +157,6 @@ struct protocol proto_pipe = { postconfig: pipe_postconfig, init: pipe_init, start: pipe_start, + shutdown: pipe_shutdown, get_status: pipe_get_status, }; |