Remove version argument on peer_cfg constructor, use ike_cfg version instead
This commit is contained in:
@@ -59,11 +59,6 @@ struct private_peer_cfg_t {
|
||||
*/
|
||||
char *name;
|
||||
|
||||
/**
|
||||
* IKE version to use for initiation
|
||||
*/
|
||||
ike_version_t ike_version;
|
||||
|
||||
/**
|
||||
* IKE config associated to this peer config
|
||||
*/
|
||||
@@ -182,7 +177,7 @@ METHOD(peer_cfg_t, get_name, char*,
|
||||
METHOD(peer_cfg_t, get_ike_version, ike_version_t,
|
||||
private_peer_cfg_t *this)
|
||||
{
|
||||
return this->ike_version;
|
||||
return this->ike_cfg->get_version(this->ike_cfg);
|
||||
}
|
||||
|
||||
METHOD(peer_cfg_t, get_ike_cfg, ike_cfg_t*,
|
||||
@@ -578,7 +573,7 @@ METHOD(peer_cfg_t, equals, bool,
|
||||
e2->destroy(e2);
|
||||
|
||||
return (
|
||||
this->ike_version == other->ike_version &&
|
||||
get_ike_version(this) == get_ike_version(other) &&
|
||||
this->cert_policy == other->cert_policy &&
|
||||
this->unique == other->unique &&
|
||||
this->keyingtries == other->keyingtries &&
|
||||
@@ -633,7 +628,7 @@ METHOD(peer_cfg_t, destroy, void,
|
||||
/*
|
||||
* Described in header-file
|
||||
*/
|
||||
peer_cfg_t *peer_cfg_create(char *name, ike_version_t ike_version,
|
||||
peer_cfg_t *peer_cfg_create(char *name,
|
||||
ike_cfg_t *ike_cfg, cert_policy_t cert_policy,
|
||||
unique_policy_t unique, u_int32_t keyingtries,
|
||||
u_int32_t rekey_time, u_int32_t reauth_time,
|
||||
@@ -689,7 +684,6 @@ peer_cfg_t *peer_cfg_create(char *name, ike_version_t ike_version,
|
||||
#endif /* ME */
|
||||
},
|
||||
.name = strdup(name),
|
||||
.ike_version = ike_version,
|
||||
.ike_cfg = ike_cfg,
|
||||
.child_cfgs = linked_list_create(),
|
||||
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
|
||||
|
||||
@@ -356,7 +356,6 @@ struct peer_cfg_t {
|
||||
* (rekeylifetime - random(0, jitter)).
|
||||
*
|
||||
* @param name name of the peer_cfg
|
||||
* @param ike_version which IKE version we should use for this peer
|
||||
* @param ike_cfg IKE config to use when acting as initiator
|
||||
* @param cert_policy should we send a certificate payload?
|
||||
* @param unique uniqueness of an IKE_SA
|
||||
@@ -374,7 +373,7 @@ struct peer_cfg_t {
|
||||
* @param peer_id ID that identifies our peer at the mediation server
|
||||
* @return peer_cfg_t object
|
||||
*/
|
||||
peer_cfg_t *peer_cfg_create(char *name, ike_version_t ike_version,
|
||||
peer_cfg_t *peer_cfg_create(char *name,
|
||||
ike_cfg_t *ike_cfg, cert_policy_t cert_policy,
|
||||
unique_policy_t unique, u_int32_t keyingtries,
|
||||
u_int32_t rekey_time, u_int32_t reauth_time,
|
||||
|
||||
Reference in New Issue
Block a user