Double check if we have a packet before retransmitting it

This commit is contained in:
Martin Willi
2012-03-20 17:31:18 +01:00
parent 0793ac497a
commit 9862852823
+2 -2
View File
@@ -871,12 +871,12 @@ METHOD(task_manager_t, process_message, status_t,
else
{
hash = chunk_hash(msg->get_packet_data(msg));
if (hash == this->responding.hash)
if (hash == this->responding.hash && this->responding.packet)
{
DBG1(DBG_IKE, "received retransmit of request with ID %d, "
"retransmitting response", mid);
charon->sender->send(charon->sender,
this->responding.packet->clone(this->responding.packet));
this->responding.packet->clone(this->responding.packet));
return SUCCESS;
}
msg->set_request(msg, TRUE);