X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fclient.c;h=687341ec03be261d633390be0c0b60943397176e;hb=9760bfae79884774c7a7edcd4035ca770bcf9a87;hp=7ff149fd4a684fe6503c49a75d2aa1b2a9856211;hpb=156b488f766d9128215d8e8d67056fa70214d314;p=silc.git diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index 7ff149fd..687341ec 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -778,7 +778,7 @@ static bool silc_client_packet_parse(SilcPacketParserContext *parser_context, SilcPacketContext *packet = parser_context->packet; SilcPacketType ret; - if (conn && conn->hmac_receive) + if (conn && conn->hmac_receive && conn->sock == sock) conn->psn_receive = parser_context->packet->sequence + 1; /* Parse the packet immediately */ @@ -797,9 +797,10 @@ static bool silc_client_packet_parse(SilcPacketParserContext *parser_context, process all packets synchronously, since there might be packets in queue that we are not able to decrypt without first processing the packets before them. */ - if (sock->protocol && sock->protocol->protocol && - (sock->protocol->protocol->type == SILC_PROTOCOL_CLIENT_KEY_EXCHANGE || - sock->protocol->protocol->type == SILC_PROTOCOL_CLIENT_REKEY)) { + if ((ret == SILC_PACKET_REKEY || ret == SILC_PACKET_REKEY_DONE) || + (sock->protocol && sock->protocol->protocol && + (sock->protocol->protocol->type == SILC_PROTOCOL_CLIENT_KEY_EXCHANGE || + sock->protocol->protocol->type == SILC_PROTOCOL_CLIENT_REKEY))) { /* Parse the incoming packet type */ silc_client_packet_parse_type(client, sock, packet);