From: Skywing Date: Sat, 22 Nov 2008 02:24:07 +0000 (-0500) Subject: Mark outbound initiated server to server connections as local. X-Git-Tag: silc.toolkit.1.1.9~17^2~1 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=068abf8c90f47d9b5d17fc1650b2b9f14ffd278c Mark outbound initiated server to server connections as local. This fixes an issue where if a disconnect packet is received by the server for an outbound silc connection (i.e. a server to server link) and there is an outstanding async operation, such as an SKE or connection auth, the server will corrupt the heap due to not properly calling the async abort routine. This issue would typically happen when we have a silcd setup to connect to a remote router server, where both ends of the connection have public keys configured, but the initiator server's IP is wrong. In this case, we will get past key exchange and then fail at the connection auth packet, typically crashing the initiator silcd after heap corruption. --- diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 5b655419..0da85e54 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -1803,6 +1803,8 @@ void silc_server_start_key_exchange(SilcServerConnection sconn) } entry->server = server; entry->data.sconn = sconn; + entry->data.conn_type = SILC_CONN_UNKNOWN; + entry->data.status |= SILC_IDLIST_STATUS_LOCAL; silc_packet_set_context(sconn->sock, entry); SILC_LOG_DEBUG(("Created unknown connection %p", entry));