ike-init: Switch to an alternative config if proposals don't match
This way we don't rely on the order of equally matching configs as heavily anymore (which is actually tricky in vici) and this also doesn't require repeating weak algorithms in all configs that might potentially be selected if there are some clients that require them. There is currently no ordering, so an explicitly configured exactly matching proposal isn't a better match than e.g. the default proposal that also contains the proposed algorithms.
This commit is contained in:
@@ -674,6 +674,7 @@ METHOD(ike_sa_t, get_ike_cfg, ike_cfg_t*,
|
||||
METHOD(ike_sa_t, set_ike_cfg, void,
|
||||
private_ike_sa_t *this, ike_cfg_t *ike_cfg)
|
||||
{
|
||||
DESTROY_IF(this->ike_cfg);
|
||||
ike_cfg->get_ref(ike_cfg);
|
||||
this->ike_cfg = ike_cfg;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user