aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/processing/jobs/process_message_job.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libcharon/processing/jobs/process_message_job.c b/src/libcharon/processing/jobs/process_message_job.c
index c5c5f07c9..a4924d001 100644
--- a/src/libcharon/processing/jobs/process_message_job.c
+++ b/src/libcharon/processing/jobs/process_message_job.c
@@ -87,7 +87,22 @@ METHOD(job_t, execute, void,
METHOD(job_t, get_priority, job_priority_t,
private_process_message_job_t *this)
{
- return JOB_PRIO_MEDIUM;
+ switch (this->message->get_exchange_type(this->message))
+ {
+ case IKE_AUTH:
+ /* IKE auth is rather expensive and often blocking, low priority */
+ return JOB_PRIO_LOW;
+ case INFORMATIONAL:
+ /* INFORMATIONALs are inexpensive, for DPD we should have low
+ * reaction times */
+ return JOB_PRIO_HIGH;
+ case IKE_SA_INIT:
+ case CREATE_CHILD_SA:
+ default:
+ /* IKE_SA_INIT is expensive, but we will drop them in the receiver
+ * if we are overloaded */
+ return JOB_PRIO_MEDIUM;
+ }
}
/*