+ /* If dst_id was set, the incoming packet must use that id as its
+ source id. This will not work if the id is channel id because
+ the source is never the channel id, but will work with other ids. */
+ if ((pws->dst_id && pws->dst_id_type != SILC_ID_CHANNEL)) {
+ silc_id_str2id2(packet->src_id, packet->src_id_len,
+ packet->src_id_type, &id);
+ if (!SILC_ID_COMPARE_TYPE(pws->dst_id, SILC_ID_GET_ID(id),
+ packet->src_id_len)) {
+ SILC_LOG_DEBUG(("Packet is not from wanted sender"));
+ return FALSE;
+ }
+ }
+