Use a connection specific option to en-/disable IKEv1 fragmentation
This commit is contained in:
@@ -89,6 +89,11 @@ struct private_ike_cfg_t {
|
||||
*/
|
||||
bool force_encap;
|
||||
|
||||
/**
|
||||
* use IKEv1 fragmentation
|
||||
*/
|
||||
bool fragmentation;
|
||||
|
||||
/**
|
||||
* List of proposals to use
|
||||
*/
|
||||
@@ -113,6 +118,12 @@ METHOD(ike_cfg_t, force_encap_, bool,
|
||||
return this->force_encap;
|
||||
}
|
||||
|
||||
METHOD(ike_cfg_t, fragmentation, bool,
|
||||
private_ike_cfg_t *this)
|
||||
{
|
||||
return this->fragmentation;
|
||||
}
|
||||
|
||||
METHOD(ike_cfg_t, get_my_addr, char*,
|
||||
private_ike_cfg_t *this, bool *allow_any)
|
||||
{
|
||||
@@ -268,6 +279,7 @@ METHOD(ike_cfg_t, equals, bool,
|
||||
this->version == other->version &&
|
||||
this->certreq == other->certreq &&
|
||||
this->force_encap == other->force_encap &&
|
||||
this->fragmentation == other->fragmentation &&
|
||||
streq(this->me, other->me) &&
|
||||
streq(this->other, other->other) &&
|
||||
this->my_port == other->my_port &&
|
||||
@@ -299,7 +311,8 @@ METHOD(ike_cfg_t, destroy, void,
|
||||
*/
|
||||
ike_cfg_t *ike_cfg_create(ike_version_t version, bool certreq, bool force_encap,
|
||||
char *me, bool my_allow_any, u_int16_t my_port,
|
||||
char *other, bool other_allow_any, u_int16_t other_port)
|
||||
char *other, bool other_allow_any, u_int16_t other_port,
|
||||
bool fragmentation)
|
||||
{
|
||||
private_ike_cfg_t *this;
|
||||
|
||||
@@ -308,6 +321,7 @@ ike_cfg_t *ike_cfg_create(ike_version_t version, bool certreq, bool force_encap,
|
||||
.get_version = _get_version,
|
||||
.send_certreq = _send_certreq,
|
||||
.force_encap = _force_encap_,
|
||||
.fragmentation = _fragmentation,
|
||||
.get_my_addr = _get_my_addr,
|
||||
.get_other_addr = _get_other_addr,
|
||||
.get_my_port = _get_my_port,
|
||||
@@ -324,6 +338,7 @@ ike_cfg_t *ike_cfg_create(ike_version_t version, bool certreq, bool force_encap,
|
||||
.version = version,
|
||||
.certreq = certreq,
|
||||
.force_encap = force_encap,
|
||||
.fragmentation = fragmentation,
|
||||
.me = strdup(me),
|
||||
.other = strdup(other),
|
||||
.my_allow_any = my_allow_any,
|
||||
|
||||
Reference in New Issue
Block a user