| From 0235914d2fa6896120ca084ef0df241e9ad7798c Mon Sep 17 00:00:00 2001 |
| From: Martin Willi <martin@revosec.ch> |
| Date: Mon, 11 Mar 2013 10:52:13 +0100 |
| Subject: [PATCH] Ignore fourth Qick Mode message sent by Windows servers. |
| |
| Initial patch by Paul Stewart, fixes #289. |
| |
| [This change will be upstream in 5.0.3] |
| --- |
| src/libcharon/sa/ikev1/task_manager_v1.c | 9 +++++++++ |
| 1 files changed, 9 insertions(+), 0 deletions(-) |
| |
| diff --git a/src/libcharon/sa/ikev1/task_manager_v1.c b/src/libcharon/sa/ikev1/task_manager_v1.c |
| index 7a84d1c..ac3b8d0 100644 |
| --- a/src/libcharon/sa/ikev1/task_manager_v1.c |
| +++ b/src/libcharon/sa/ikev1/task_manager_v1.c |
| @@ -1163,6 +1163,15 @@ static status_t process_response(private_task_manager_t *this, |
| |
| if (message->get_exchange_type(message) != this->initiating.type) |
| { |
| + /* Windows server sends a fourth quick mode message having an initial |
| + * contact notify. Ignore this message for compatibility. */ |
| + if (this->initiating.type == EXCHANGE_TYPE_UNDEFINED && |
| + message->get_exchange_type(message) == QUICK_MODE && |
| + message->get_notify(message, INITIAL_CONTACT)) |
| + { |
| + DBG1(DBG_IKE, "ignoring fourth Quick Mode message"); |
| + return SUCCESS; |
| + } |
| DBG1(DBG_IKE, "received %N response, but expected %N", |
| exchange_type_names, message->get_exchange_type(message), |
| exchange_type_names, this->initiating.type); |
| -- |
| 1.7.4.1 |
| |