aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/sa/ike_sa.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c
index 5a27de5e7..c5683e93b 100644
--- a/src/libcharon/sa/ike_sa.c
+++ b/src/libcharon/sa/ike_sa.c
@@ -1077,7 +1077,11 @@ METHOD(ike_sa_t, initiate, status_t,
{
if (this->state == IKE_CREATED)
{
- resolve_hosts(this);
+ if (this->my_host->is_anyaddr(this->my_host) ||
+ this->other_host->is_anyaddr(this->other_host))
+ {
+ resolve_hosts(this);
+ }
if (this->other_host->is_anyaddr(this->other_host)
#ifdef ME