Apply IKE major/minor version set on message to IKE header
authorMartin Willi <martin@revosec.ch>
Thu, 11 Nov 2010 15:37:26 +0000 (16:37 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 5 Jan 2011 15:45:46 +0000 (16:45 +0100)
src/libcharon/encoding/message.c

index 41f0ede..6d4d458 100644 (file)
@@ -1074,6 +1074,8 @@ METHOD(message_t, generate, status_t,
        }
 
        ike_header = ike_header_create();
+       ike_header->set_maj_version(ike_header, this->major_version);
+       ike_header->set_min_version(ike_header, this->minor_version);
        ike_header->set_exchange_type(ike_header, this->exchange_type);
        ike_header->set_message_id(ike_header, this->message_id);
        ike_header->set_response_flag(ike_header, !this->is_request);
@@ -1467,6 +1469,8 @@ message_t *message_create_from_packet(packet_t *packet)
                        .get_packet_data = _get_packet_data,
                        .destroy = _destroy,
                },
+               .major_version = IKE_MAJOR_VERSION,
+               .minor_version = IKE_MINOR_VERSION,
                .exchange_type = EXCHANGE_TYPE_UNDEFINED,
                .is_request = TRUE,
                .first_payload = NO_PAYLOAD,