proposal: Add selection flags to clone() method
This avoids having to call strip_dh() in child_cfg_t::get_proposals(). It also inverts the ALLOW_PRIVATE flag (i.e. makes it SKIP_PRIVATE) so nothing has to be supplied to clone complete proposals.
This commit is contained in:
@@ -564,9 +564,9 @@ static status_t select_and_install(private_child_create_t *this,
|
||||
{
|
||||
flags |= PROPOSAL_SKIP_DH;
|
||||
}
|
||||
if (this->ike_sa->supports_extension(this->ike_sa, EXT_STRONGSWAN))
|
||||
if (!this->ike_sa->supports_extension(this->ike_sa, EXT_STRONGSWAN))
|
||||
{
|
||||
flags |= PROPOSAL_ALLOW_PRIVATE;
|
||||
flags |= PROPOSAL_SKIP_PRIVATE;
|
||||
}
|
||||
if (!lib->settings->get_bool(lib->settings,
|
||||
"%s.prefer_configured_proposals", TRUE, lib->ns))
|
||||
|
||||
@@ -458,9 +458,9 @@ static void process_sa_payload(private_ike_init_t *this, message_t *message,
|
||||
ike_cfg = this->ike_sa->get_ike_cfg(this->ike_sa);
|
||||
|
||||
proposal_list = sa_payload->get_proposals(sa_payload);
|
||||
if (this->ike_sa->supports_extension(this->ike_sa, EXT_STRONGSWAN))
|
||||
if (!this->ike_sa->supports_extension(this->ike_sa, EXT_STRONGSWAN))
|
||||
{
|
||||
flags |= PROPOSAL_ALLOW_PRIVATE;
|
||||
flags |= PROPOSAL_SKIP_PRIVATE;
|
||||
}
|
||||
if (!lib->settings->get_bool(lib->settings,
|
||||
"%s.prefer_configured_proposals", TRUE, lib->ns))
|
||||
|
||||
Reference in New Issue
Block a user