}
METHOD(child_cfg_t, get_proposals, linked_list_t*,
- private_child_cfg_t *this, bool strip_ke)
+ private_child_cfg_t *this, bool strip_ke, bool log)
{
enumerator_t *enumerator;
proposal_t *current;
}
enumerator->destroy(enumerator);
- DBG2(DBG_CFG, "configured proposals: %#P", proposals);
-
+ if (log)
+ {
+ DBG2(DBG_CFG, "configured proposals: %#P", proposals);
+ }
return proposals;
}
* Resulting list and all of its proposals must be freed after use.
*
* @param strip_ke TRUE strip out key exchange methods
+ * @param log whether to log the configured proposals
* @return list of proposals
*/
- linked_list_t* (*get_proposals)(child_cfg_t *this, bool strip_ke);
+ linked_list_t* (*get_proposals)(child_cfg_t *this, bool strip_ke, bool log);
/**
* Select a proposal from a supplied list.
proposal_t *proposal;
enumerator_t *enumerator;
- list = this->config->get_proposals(this->config, FALSE);
+ list = this->config->get_proposals(this->config, FALSE, TRUE);
enumerator = list->create_enumerator(list);
while (enumerator->enumerate(enumerator, &proposal))
{
}
}
- list = this->config->get_proposals(this->config, FALSE);
+ list = this->config->get_proposals(this->config, FALSE, TRUE);
if (list->get_first(list, (void**)&proposal) == SUCCESS)
{
this->proto = proposal->get_protocol(proposal);
OPT_PER_CPU_SAS);
}
- this->proposals = this->config->get_proposals(this->config, no_ke);
+ this->proposals = this->config->get_proposals(this->config, no_ke, TRUE);
this->mode = this->config->get_mode(this->config);
this->child.if_id_in_def = this->ike_sa->get_if_id(this->ike_sa, TRUE);
switch (type)
{
case NO_PROPOSAL_CHOSEN:
- list = this->config->get_proposals(this->config, FALSE);
+ list = this->config->get_proposals(this->config, FALSE, FALSE);
charon->bus->alert(charon->bus, ALERT_PROPOSAL_MISMATCH_CHILD, list);
list->destroy_offset(list, offsetof(proposal_t, destroy));
break;
/* we don't know the finally negotiated protocol (ESP|AH), we install
* the SA with the protocol of the first proposal */
- proposals = child->get_proposals(child, TRUE);
+ proposals = child->get_proposals(child, TRUE, FALSE);
if (proposals->get_first(proposals, (void**)&proposal) == SUCCESS)
{
proto = proposal->get_protocol(proposal);