completion callback, which might have closed it already.
Affected file silcd/server.c.
+ * Fixed rekey with PFS in backup router. It did not allow
+ rekeys with PFS, and when the rekey protocol timedout
+ it crashed the backup router without the above fix. Affected
+ file silcd/packet_send.c and server.c.
+
Sat Feb 28 16:25:09 EET 2004 Pekka Riikonen <priikone@silcnet.org>
* The silc_client_add_channel_private_key now returns the
rekeys, though */
if ((idata && idata->status & SILC_IDLIST_STATUS_DISABLED &&
type != SILC_PACKET_HEARTBEAT && type != SILC_PACKET_REKEY &&
- type != SILC_PACKET_REKEY_DONE) ||
+ type != SILC_PACKET_REKEY_DONE && type != SILC_PACKET_KEY_EXCHANGE_1
+ && type != SILC_PACKET_KEY_EXCHANGE_2) ||
(sock->user_data == server->id_entry)) {
SILC_LOG_DEBUG(("Connection is disabled"));
return;
idata = (SilcIDListData)sock->user_data;
- /* If entry is disabled do not sent anything. */
- if ((idata && idata->status & SILC_IDLIST_STATUS_DISABLED) ||
- sock->user_data == server->id_entry) {
+ /* If entry is disabled do not sent anything. Allow hearbeat and
+ rekeys, though */
+ if ((idata && idata->status & SILC_IDLIST_STATUS_DISABLED &&
+ type != SILC_PACKET_HEARTBEAT && type != SILC_PACKET_REKEY &&
+ type != SILC_PACKET_REKEY_DONE && type != SILC_PACKET_KEY_EXCHANGE_1
+ && type != SILC_PACKET_KEY_EXCHANGE_2) ||
+ (sock->user_data == server->id_entry)) {
SILC_LOG_DEBUG(("Connection is disabled"));
return;
}
/* Get data used in the packet sending, keys and stuff */
idata = (SilcIDListData)sock->user_data;
- /* If entry is disabled do not sent anything. */
- if ((idata && idata->status & SILC_IDLIST_STATUS_DISABLED) ||
- sock->user_data == server->id_entry) {
+ /* If entry is disabled do not sent anything. Allow hearbeat and
+ rekeys, though */
+ if ((idata && idata->status & SILC_IDLIST_STATUS_DISABLED &&
+ type != SILC_PACKET_HEARTBEAT && type != SILC_PACKET_REKEY &&
+ type != SILC_PACKET_REKEY_DONE && type != SILC_PACKET_KEY_EXCHANGE_1
+ && type != SILC_PACKET_KEY_EXCHANGE_2) ||
+ (sock->user_data == server->id_entry)) {
SILC_LOG_DEBUG(("Connection is disabled"));
return;
}
/* If entry is disabled ignore what we got. */
if (idata && idata->status & SILC_IDLIST_STATUS_DISABLED &&
ret != SILC_PACKET_HEARTBEAT && ret != SILC_PACKET_RESUME_ROUTER &&
- ret != SILC_PACKET_REKEY && ret != SILC_PACKET_REKEY_DONE) {
- SILC_LOG_DEBUG(("Connection is disabled"));
+ ret != SILC_PACKET_REKEY && ret != SILC_PACKET_REKEY_DONE &&
+ ret != SILC_PACKET_KEY_EXCHANGE_1 && ret != SILC_PACKET_KEY_EXCHANGE_2) {
+ SILC_LOG_DEBUG(("Connection is disabled (packet %s dropped)",
+ silc_get_packet_name(ret)));
goto out;
}