proposal: Handle skipping DH groups directly in select() and matches()
Also renames the flag.
This commit is contained in:
@@ -253,11 +253,6 @@ METHOD(child_cfg_t, select_proposal, proposal_t*,
|
||||
|
||||
while (prefer_enum->enumerate(prefer_enum, &proposal))
|
||||
{
|
||||
proposal = proposal->clone(proposal);
|
||||
if (flags & PROPOSAL_STRIP_DH)
|
||||
{
|
||||
proposal->strip_dh(proposal, MODP_NONE);
|
||||
}
|
||||
if (flags & PROPOSAL_PREFER_CONFIGURED)
|
||||
{
|
||||
proposals->reset_enumerator(proposals, match_enum);
|
||||
@@ -268,13 +263,7 @@ METHOD(child_cfg_t, select_proposal, proposal_t*,
|
||||
}
|
||||
while (match_enum->enumerate(match_enum, &match))
|
||||
{
|
||||
match = match->clone(match);
|
||||
if (flags & PROPOSAL_STRIP_DH)
|
||||
{
|
||||
match->strip_dh(match, MODP_NONE);
|
||||
}
|
||||
selected = proposal->select(proposal, match, flags);
|
||||
match->destroy(match);
|
||||
if (selected)
|
||||
{
|
||||
DBG2(DBG_CFG, "received proposals: %#P", proposals);
|
||||
@@ -283,7 +272,6 @@ METHOD(child_cfg_t, select_proposal, proposal_t*,
|
||||
break;
|
||||
}
|
||||
}
|
||||
proposal->destroy(proposal);
|
||||
if (selected)
|
||||
{
|
||||
break;
|
||||
|
||||
@@ -562,7 +562,7 @@ static status_t select_and_install(private_child_create_t *this,
|
||||
|
||||
if (no_dh)
|
||||
{
|
||||
flags |= PROPOSAL_STRIP_DH;
|
||||
flags |= PROPOSAL_SKIP_DH;
|
||||
}
|
||||
if (this->ike_sa->supports_extension(this->ike_sa, EXT_STRONGSWAN))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user