aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-07-01 11:01:27 +0000
committerMartin Willi <martin@strongswan.org>2008-07-01 11:01:27 +0000
commit9eeaa25f5d6304a505dc79bdfc9a787396e1d308 (patch)
tree97f4047159746d470d64bee699017a76f763710f
parent62bd123952598a28584d487daf3ce2872f71b700 (diff)
downloadstrongswan-9eeaa25f5d6304a505dc79bdfc9a787396e1d308.tar.bz2
strongswan-9eeaa25f5d6304a505dc79bdfc9a787396e1d308.tar.xz
added host match prio to debugging output
-rw-r--r--src/charon/config/backend_manager.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/charon/config/backend_manager.c b/src/charon/config/backend_manager.c
index 1d3a0b4f0..138c39b16 100644
--- a/src/charon/config/backend_manager.c
+++ b/src/charon/config/backend_manager.c
@@ -185,17 +185,17 @@ static ike_cfg_t *get_ike_cfg(private_backend_manager_t *this,
{
match = get_match(current, me, other);
- if (match > MATCH_NONE)
+ if (match)
{
DBG2(DBG_CFG, " candidate: %s...%s, prio %d",
current->get_my_addr(current), current->get_other_addr(current),
match);
if (match > best)
{
- best = match;
DESTROY_IF(found);
found = current;
found->get_ref(found);
+ best = match;
}
}
}
@@ -258,11 +258,12 @@ static peer_cfg_t *get_peer_cfg(private_backend_manager_t *this, host_t *me,
match_peer = m1 + m2;
match_ike = get_match(current->get_ike_cfg(current), me, other);
- if (m1 && m2 && match_ike > MATCH_NONE &&
+ if (m1 && m2 && match_ike &&
auth->complies(auth, current->get_auth(current)))
{
- DBG2(DBG_CFG, " candidate '%s': %D...%D, prio %d",
- current->get_name(current), my_cand, other_cand, match_peer);
+ DBG2(DBG_CFG, " candidate '%s': %D...%D, prio %d.%d",
+ current->get_name(current), my_cand, other_cand,
+ match_peer, match_ike);
if (match_peer >= best_peer && match_ike > best_ike)
{
DESTROY_IF(found);
@@ -275,9 +276,9 @@ static peer_cfg_t *get_peer_cfg(private_backend_manager_t *this, host_t *me,
}
if (found)
{
- DBG1(DBG_CFG, "found matching config \"%s\": %D...%D, prio %d",
+ DBG1(DBG_CFG, "found matching config \"%s\": %D...%D, prio %d.%d",
found->get_name(found), found->get_my_id(found),
- found->get_other_id(found), best_peer);
+ found->get_other_id(found), best_peer, best_ike);
}
enumerator->destroy(enumerator);
this->mutex->unlock(this->mutex);