Pass IKE version to peer config enumerator, filter configs

This commit is contained in:
Martin Willi
2012-03-20 17:31:25 +01:00
parent d94c923648
commit ac009df132
10 changed files with 57 additions and 31 deletions
+1 -1
View File
@@ -272,7 +272,7 @@ static bool load_cfg_candidates(private_ike_auth_t *this)
DBG1(DBG_CFG, "looking for peer configs matching %H[%Y]...%H[%Y]",
me, my_id, other, other_id);
enumerator = charon->backends->create_peer_cfg_enumerator(charon->backends,
me, other, my_id, other_id);
me, other, my_id, other_id, IKEV2);
while (enumerator->enumerate(enumerator, &peer_cfg))
{
peer_cfg->get_ref(peer_cfg);
+2 -2
View File
@@ -406,7 +406,7 @@ static peer_cfg_t *select_config(private_main_mode_t *this, identification_t *id
DBG1(DBG_CFG, "looking for %N peer configs matching %H...%H[%Y]",
auth_method_names, this->auth_method, me, other, id);
enumerator = charon->backends->create_peer_cfg_enumerator(charon->backends,
me, other, NULL, id);
me, other, NULL, id, IKEV1);
while (enumerator->enumerate(enumerator, &current))
{
if (get_auth_method(this, current) == this->auth_method)
@@ -811,7 +811,7 @@ static shared_key_t *lookup_shared_key(private_main_mode_t *this)
peer_cfg_t *peer_cfg = NULL;
enumerator = charon->backends->create_peer_cfg_enumerator(
charon->backends, me, other, NULL, NULL);
charon->backends, me, other, NULL, NULL, IKEV1);
while (enumerator->enumerate(enumerator, &peer_cfg))
{
my_auth = get_auth_cfg(peer_cfg, TRUE);