In diald 2.0 from CVS, if you down the link with a fifo
DOWN command, the link will hang up and then
immediately dial again.
Investigation reveals that in firewall.c, in
del_connection(), the unit->live count is not
decremented when the connections are deleted by
flush_timeout_queue(). The queue is emptied, but the
unit->live count is not changed, and queue_empty()
returns false even though the queue is indeed empty.
Here's a patch to correct this:
*** diald-2.0.cvs-2003-12-28/diald/firewall.c
2002-04-24 07:08:25.000000000 -0400
--- diald-2.0.cvs-2003-12-28.new/diald/firewall.c
2003-12-28 19:47:13.997205696 -0500
***************
*** 535,540 ****
--- 535,541 ----
c->next->prev = c->prev;
c->prev->next = c->next;
+ c->unit->live--;
free(c);
}
Regards,
Mark Frey
mark_frey_2000 at yahoo.ca
Logged In: NO
Sorry, I should have tested this a bit more before posting a
patch :-(
Other callers to del_connection() are adjusting unit->live,
so we should be adjusting it in ctl_firewall (case
IP_FW_QFLUSH). This patch should do it right: (but
shouldn't all the unit->live adjustments be done in
del_connection() instead of by the callers?)
*** diald-2.0.cvs-2003-12-28/diald/firewall.c 2002-04-24
07:08:25.000000000 -0400
--- diald-2.0.cvs-2003-12-28.new/diald/firewall.c
2003-12-28 20:42:46.628204008 -0500
***************
*** 1319,1324 ****
--- 1319,1325 ----
cn = c->next;
del_timer(&c->timer);
del_connection(c);
+ c->unit->live--;
}
return 0;
}
Mark.