When a BFD session is removed while being scheduled for notification,
the session stays in notify list and is removed twice, which leads to
a strange crash after a while.
{
ip_addr ip = s->addr;
+ /* Caller should ensure that request list is empty */
+
birdloop_enter(p->loop);
+ /* Remove session from notify list if scheduled for notification */
+ /* No need for bfd_lock_sessions(), we are already protected by birdloop_enter() */
+ if (NODE_VALID(&s->n))
+ rem_node(&s->n);
+
bfd_free_iface(s->ifa);
rfree(s->tx_timer);