aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-03-05 22:07:36 +0000
committerMartin Willi <martin@strongswan.org>2007-03-05 22:07:36 +0000
commit6e1be4274411731df619d025355c21fda53b435c (patch)
tree1ce0a974085b25e38ade080649fa6ecf10ea45d7
parent02b3101b670dca4b6e83ce41cf28afe605b852e2 (diff)
downloadstrongswan-6e1be4274411731df619d025355c21fda53b435c.tar.bz2
strongswan-6e1be4274411731df619d025355c21fda53b435c.tar.xz
some cleanups
not assigning %any virtual IPs to peer anymore
-rw-r--r--src/charon/config/proposal.c6
-rw-r--r--src/charon/sa/tasks/child_create.c14
2 files changed, 7 insertions, 13 deletions
diff --git a/src/charon/config/proposal.c b/src/charon/config/proposal.c
index 5aa4ac053..9133bf6f9 100644
--- a/src/charon/config/proposal.c
+++ b/src/charon/config/proposal.c
@@ -222,9 +222,6 @@ static bool select_algo(linked_list_t *first, linked_list_t *second, bool *add,
second_iter->reset(second_iter);
while (second_iter->iterate(second_iter, (void**)&second_alg))
{
- DBG2(DBG_CFG, "comparing algo %d - %d, keylen %d - %d",
- first_alg->algorithm, second_alg->algorithm,
- first_alg->key_size, second_alg->key_size);
if (first_alg->algorithm == second_alg->algorithm &&
first_alg->key_size == second_alg->key_size)
{
@@ -276,8 +273,7 @@ static proposal_t *select_proposal(private_proposal_t *this, private_proposal_t
else
{
selected->destroy(selected);
- DBG2(DBG_CFG, " no acceptable ENCRYPTION_ALGORITHM found contained %d - %d, skipping",
- this->encryption_algos->get_count(this->encryption_algos), other->encryption_algos->get_count(other->encryption_algos));
+ DBG2(DBG_CFG, " no acceptable ENCRYPTION_ALGORITHM found, skipping");
return NULL;
}
/* select integrity algorithm */
diff --git a/src/charon/sa/tasks/child_create.c b/src/charon/sa/tasks/child_create.c
index 90ac2d06b..6e74f9d15 100644
--- a/src/charon/sa/tasks/child_create.c
+++ b/src/charon/sa/tasks/child_create.c
@@ -193,9 +193,13 @@ static status_t select_and_install(private_child_create_t *this)
my_vip = this->ike_sa->get_virtual_ip(this->ike_sa, TRUE);
other_vip = this->ike_sa->get_virtual_ip(this->ike_sa, FALSE);
- DBG1(DBG_IKE, "received %d proposals, selecting:", this->proposals->get_count(this->proposals));
this->proposal = this->policy->select_proposal(this->policy, this->proposals);
- DBG1(DBG_IKE, "proposal is %p", this->proposal);
+
+ if (this->proposal == NULL)
+ {
+ SIG(CHILD_UP_FAILED, "no acceptable proposal found");
+ return FAILED;
+ }
if (this->initiator && my_vip)
{ /* if we have a virtual IP, shorten our TS to the minimum */
@@ -232,12 +236,6 @@ static status_t select_and_install(private_child_create_t *this)
this->tsi = other_ts;
}
- if (this->proposal == NULL)
- {
- SIG(CHILD_UP_FAILED, "no acceptable proposal found");
- return FAILED;
- }
-
if (this->tsi->get_count(this->tsi) == 0 ||
this->tsr->get_count(this->tsr) == 0)
{