aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/plugins/sql
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-06-06 15:05:54 +0000
committerMartin Willi <martin@strongswan.org>2008-06-06 15:05:54 +0000
commit5a22a02156816fc9f56ca56c70fbfda6574b285d (patch)
tree061ab063820d3db0272c55083ff26ac6d170ce51 /src/charon/plugins/sql
parent1e9c46f13daced3199953f4d1758c7e03c935083 (diff)
downloadstrongswan-5a22a02156816fc9f56ca56c70fbfda6574b285d.tar.bz2
strongswan-5a22a02156816fc9f56ca56c70fbfda6574b285d.tar.xz
DNS resolving of ike_cfg hosts dynamically on demand
Diffstat (limited to 'src/charon/plugins/sql')
-rw-r--r--src/charon/plugins/sql/sql_config.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/charon/plugins/sql/sql_config.c b/src/charon/plugins/sql/sql_config.c
index 06fd29850..7a2e96fe6 100644
--- a/src/charon/plugins/sql/sql_config.c
+++ b/src/charon/plugins/sql/sql_config.c
@@ -179,34 +179,9 @@ static ike_cfg_t *build_ike_cfg(private_sql_config_t *this, enumerator_t *e,
while (e->enumerate(e, &certreq, &force_encap, &local, &remote))
{
- host_t *me, *other;
ike_cfg_t *ike_cfg;
- me = host_create_from_string(local, 500);
- if (!me)
- {
- continue;
- }
- if (my_host && !me->is_anyaddr(me) &&
- !me->ip_equals(me, my_host))
- {
- me->destroy(me);
- continue;
- }
- other = host_create_from_string(remote, 500);
- if (!other)
- {
- me->destroy(me);
- continue;
- }
- if (other_host && !other->is_anyaddr(other) &&
- !other->ip_equals(other, other_host))
- {
- me->destroy(me);
- other->destroy(other);
- continue;
- }
- ike_cfg = ike_cfg_create(certreq, force_encap, me, other);
+ ike_cfg = ike_cfg_create(certreq, force_encap, local, remote);
/* TODO: read proposal from db */
ike_cfg->add_proposal(ike_cfg, proposal_create_default(PROTO_IKE));
return ike_cfg;