summaryrefslogtreecommitdiff
path: root/nest/neighbor.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/neighbor.c')
-rw-r--r--nest/neighbor.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nest/neighbor.c b/nest/neighbor.c
index cb2d1b2b..e10413bd 100644
--- a/nest/neighbor.c
+++ b/nest/neighbor.c
@@ -210,6 +210,8 @@ if_intersect(struct iface *ia, struct iface *ib)
neighbor *
neigh_find(struct proto *p, ip_addr a, struct iface *iface, uint flags)
{
+ ASSERT_DIE(birdloop_inside(&main_birdloop));
+
neighbor *n;
int class, scope = -1;
uint h = neigh_hash(p, a, iface);
@@ -308,8 +310,12 @@ neigh_dump_all(void)
static inline void
neigh_notify(neighbor *n)
{
- if (n->proto->neigh_notify && (n->proto->proto_state != PS_STOP))
- n->proto->neigh_notify(n);
+ if (!n->proto->neigh_notify)
+ return;
+
+ PROTO_LOCKED_FROM_MAIN(n->proto)
+ if (n->proto->proto_state != PS_STOP)
+ n->proto->neigh_notify(n);
}
static void