X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcske%2Fsilcske.c;fp=lib%2Fsilcske%2Fsilcske.c;h=efb86c12b63b79ffbedd9eeeb54d2094e53375a8;hb=b280ae52db9aedad40a04691d0a854febfe7b692;hp=b5686595213f6494d278f45012d40a5e99aef2d3;hpb=ffff126beab26b5886d30453b30c49a224ac95eb;p=silc.git diff --git a/lib/silcske/silcske.c b/lib/silcske/silcske.c index b5686595..efb86c12 100644 --- a/lib/silcske/silcske.c +++ b/lib/silcske/silcske.c @@ -1884,6 +1884,7 @@ SILC_FSM_STATE(silc_ske_st_responder_phase1) SilcSKEStatus status; SilcSKEStartPayload remote_payload = NULL; SilcBuffer packet_buf = &ske->packet->buffer; + SilcID id; SILC_LOG_DEBUG(("Start")); @@ -1898,6 +1899,19 @@ SILC_FSM_STATE(silc_ske_st_responder_phase1) return SILC_FSM_CONTINUE; } + /* Get remote ID and set it to stream */ + if (ske->packet->src_id_len) { + silc_id_str2id(ske->packet->src_id, ske->packet->src_id_len, + ske->packet->src_id_type, + (ske->packet->src_id_type == SILC_ID_SERVER ? + (void *)&id.u.server_id : (void *)&id.u.client_id), + (ske->packet->src_id_type == SILC_ID_SERVER ? + sizeof(id.u.server_id) : sizeof(id.u.client_id))); + silc_packet_set_ids(ske->stream, 0, NULL, ske->packet->src_id_type, + (ske->packet->src_id_type == SILC_ID_SERVER ? + (void *)&id.u.server_id : (void *)&id.u.client_id)); + } + /* Take a copy of the payload buffer for future use. It is used to compute the HASH value. */ ske->start_payload_copy = silc_buffer_copy(packet_buf);