Cancel silc_server_connect_to_router_retry when connecting.
authorSkywing <skywing@valhallalegends.com>
Sat, 22 Nov 2008 04:57:32 +0000 (23:57 -0500)
committerSkywing <skywing@valhallalegends.com>
Sat, 22 Nov 2008 04:57:32 +0000 (23:57 -0500)
commit5c43a88e369950a34b1c40d655b598bedd16beda
tree1a4544a3398d0ef574b4ac396615b7bb0455f3db
parent068abf8c90f47d9b5d17fc1650b2b9f14ffd278c
Cancel silc_server_connect_to_router_retry when connecting.

There exists a crash bug such that an un-cancelled timeout callback for
silc_server_connect_to_retry fires after the connection object has
already been cleaned up.  Any router_retry requests must be cancelled
when we are deleting the associated connect object.  The fix that was
implemented was to cancel silc_server_connect_to_router_retry in
addition to silc_server_connect_to_router when a call to
silc_server_create_connections is made.  (This routine is called when
we are to make new server connections if reconnects are enabled.)

The problem would typically occur after a long enough time with silcd
trying to connect to a router server over and over; there is a race
condition component that can delay the initial use-after-free condition
for some time.
apps/silcd/server_internal.h
apps/silcd/server_util.c