diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-11 22:27:06 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-11 22:27:06 +0100 |
commit | c83876265eeae3591bfe90375503728e633cb807 (patch) | |
tree | ee5302b85bf3d9dc1da67a9d59ca9eb4bbfd83f9 /nest/protocol.h | |
parent | a2ea1bac601ca79946e2a215dac9427c526cedab (diff) |
Fixes a tricky bug in the pipe protocol.
When uncofiguring the pipe and the peer table, the peer table was
unlocked when pipe protocol state changed to down/flushing and not to
down/hungry. This leads to the removal of the peer table before
the routes from the pipe were flushed.
The fix leads to adding some pipe-specific hacks to the nest,
but this seems inevitable.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r-- | nest/protocol.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nest/protocol.h b/nest/protocol.h index 5a69b33b..99d8dc80 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -334,4 +334,18 @@ struct announce_hook { struct announce_hook *proto_add_announce_hook(struct proto *, struct rtable *); +/* + * Some pipe-specific nest hacks + */ + +#ifdef CONFIG_PIPE + +static inline int proto_is_pipe(struct proto *p) +{ return p->proto == &proto_pipe; } + +struct rtable *pipe_get_peer_table(struct proto *p); + +#endif + + #endif |