Don't update an IKE_SA-entry's cached message ID when handling fragments
authorTobias Brunner <tobias@strongswan.org>
Wed, 12 Dec 2012 17:23:11 +0000 (18:23 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 24 Dec 2012 11:29:26 +0000 (12:29 +0100)
src/libcharon/sa/ike_sa_manager.c

index 031c632..9627876 100644 (file)
@@ -1280,7 +1280,10 @@ METHOD(ike_sa_manager_t, checkout_by_message, ike_sa_t*,
 
                        ike_id = entry->ike_sa->get_id(entry->ike_sa);
                        entry->checked_out = TRUE;
-                       entry->message_id = message->get_message_id(message);
+                       if (message->get_first_payload_type(message) != FRAGMENT_V1)
+                       {
+                               entry->message_id = message->get_message_id(message);
+                       }
                        if (ike_id->get_responder_spi(ike_id) == 0)
                        {
                                ike_id->set_responder_spi(ike_id, id->get_responder_spi(id));