summaryrefslogtreecommitdiffstats
path: root/nest/neighbor.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-12-08 12:24:55 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-12-08 12:24:55 +0100
commitd6a836f8d673a117fd19136d24e98fa9bbc4b27e (patch)
tree5bb42645fe4dffef1b0495cb1fb83edf9022ce68 /nest/neighbor.c
parentfbde6c39084637c2f3f4d31261a44dbf367958d1 (diff)
downloadbird-d6a836f8d673a117fd19136d24e98fa9bbc4b27e.tar
bird-d6a836f8d673a117fd19136d24e98fa9bbc4b27e.zip
Fixes core state machine.
The core state machine was broken - it didn't free resources in START -> DOWN transition and might freed resources after UP -> STOP transition before protocol turned down. It leads to deadlock on olock acquisition when lock was not freed during previous stop. The current behavior is that resources, allocated during DOWN -> * transition, are freed in * -> DOWN transition, and flushing (scheduled in UP -> *) just counteract feeding (scheduled in * -> UP). Protocol fell down when both flushing is done (if needed) and protocol reports DOWN. BTW, is thera a reason why neighbour cache item acquired by protocol is not tracked by resource mechanism?
Diffstat (limited to 'nest/neighbor.c')
-rw-r--r--nest/neighbor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nest/neighbor.c b/nest/neighbor.c
index c6e2f73..2c5af6a 100644
--- a/nest/neighbor.c
+++ b/nest/neighbor.c
@@ -254,7 +254,7 @@ neigh_if_down(struct iface *i)
static inline void
neigh_prune_one(neighbor *n)
{
- if (n->proto->core_state != FS_FLUSHING)
+ if (n->proto->proto_state != PS_DOWN)
return;
rem_node(&n->n);
if (n->iface)