Invoke message hook before generation, allowing plugins to mangle it
This commit is contained in:
@@ -454,6 +454,7 @@ static status_t build_request(private_task_manager_t *this)
|
||||
/* update exchange type if a task changed it */
|
||||
this->initiating.type = message->get_exchange_type(message);
|
||||
|
||||
charon->bus->message(charon->bus, message, FALSE);
|
||||
status = this->ike_sa->generate_message(this->ike_sa, message,
|
||||
&this->initiating.packet);
|
||||
if (status != SUCCESS)
|
||||
@@ -465,8 +466,6 @@ static status_t build_request(private_task_manager_t *this)
|
||||
charon->bus->ike_updown(charon->bus, this->ike_sa, FALSE);
|
||||
return DESTROY_ME;
|
||||
}
|
||||
|
||||
charon->bus->message(charon->bus, message, FALSE);
|
||||
message->destroy(message);
|
||||
|
||||
return retransmit(this, this->initiating.mid);
|
||||
@@ -644,9 +643,9 @@ static status_t build_response(private_task_manager_t *this, message_t *request)
|
||||
/* message complete, send it */
|
||||
DESTROY_IF(this->responding.packet);
|
||||
this->responding.packet = NULL;
|
||||
charon->bus->message(charon->bus, message, FALSE);
|
||||
status = this->ike_sa->generate_message(this->ike_sa, message,
|
||||
&this->responding.packet);
|
||||
charon->bus->message(charon->bus, message, FALSE);
|
||||
message->destroy(message);
|
||||
if (status != SUCCESS)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user