]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Ignore fourth Qick Mode message sent by Windows servers.
authorMartin Willi <martin@revosec.ch>
Mon, 11 Mar 2013 09:52:13 +0000 (10:52 +0100)
committerMartin Willi <martin@revosec.ch>
Mon, 11 Mar 2013 09:53:55 +0000 (10:53 +0100)
Initial patch by Paul Stewart, fixes #289.

src/libcharon/sa/ikev1/task_manager_v1.c

index 7a84d1cefaa22da07ba25295bab6f6b9d0bf22d4..ac3b8d0dc385195d760b320a290d5209a97418fc 100644 (file)
@@ -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);