Store the major IKE version on ike_sa_id_t.
This commit is contained in:
@@ -67,6 +67,7 @@ typedef struct ike_sa_id_encoding_t ike_sa_id_encoding_t;
|
||||
* Encoding if an ike_sa_id_t
|
||||
*/
|
||||
struct ike_sa_id_encoding_t {
|
||||
u_int8_t ike_version;
|
||||
u_int64_t initiator_spi;
|
||||
u_int64_t responder_spi;
|
||||
u_int8_t initiator;
|
||||
@@ -157,6 +158,7 @@ METHOD(ha_message_t, add_attribute, void,
|
||||
enc = (ike_sa_id_encoding_t*)(this->buf.ptr + this->buf.len);
|
||||
this->buf.len += sizeof(ike_sa_id_encoding_t);
|
||||
enc->initiator = id->is_initiator(id);
|
||||
enc->ike_version = id->get_ike_version(id);
|
||||
enc->initiator_spi = id->get_initiator_spi(id);
|
||||
enc->responder_spi = id->get_responder_spi(id);
|
||||
break;
|
||||
@@ -357,8 +359,9 @@ METHOD(enumerator_t, attribute_enumerate, bool,
|
||||
return FALSE;
|
||||
}
|
||||
enc = (ike_sa_id_encoding_t*)(this->buf.ptr);
|
||||
value->ike_sa_id = ike_sa_id_create(enc->initiator_spi,
|
||||
enc->responder_spi, enc->initiator);
|
||||
value->ike_sa_id = ike_sa_id_create(enc->ike_version,
|
||||
enc->initiator_spi, enc->responder_spi,
|
||||
enc->initiator);
|
||||
*attr_out = attr;
|
||||
this->cleanup = (void*)value->ike_sa_id->destroy;
|
||||
this->cleanup_data = value->ike_sa_id;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/**
|
||||
* Protocol version of this implementation
|
||||
*/
|
||||
#define HA_MESSAGE_VERSION 2
|
||||
#define HA_MESSAGE_VERSION 3
|
||||
|
||||
typedef struct ha_message_t ha_message_t;
|
||||
typedef enum ha_message_type_t ha_message_type_t;
|
||||
|
||||
Reference in New Issue
Block a user