aboutsummaryrefslogtreecommitdiffstats
path: root/src/starter/starterwhack.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2008-04-13 21:42:44 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2008-04-13 21:42:44 +0000
commitff41ca0dc44a87047372386d3a481eb7030cc6d1 (patch)
treea397a6b61fcc51c73b2615446036082592d5e78f /src/starter/starterwhack.c
parent743d9c7b20edbb5f1429f4af446737eab14fdbf6 (diff)
downloadstrongswan-ff41ca0dc44a87047372386d3a481eb7030cc6d1.tar.bz2
strongswan-ff41ca0dc44a87047372386d3a481eb7030cc6d1.tar.xz
host_srcip was not properly initialized in starterwhack.c
Diffstat (limited to 'src/starter/starterwhack.c')
-rw-r--r--src/starter/starterwhack.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/starter/starterwhack.c b/src/starter/starterwhack.c
index 970c74d20..84c1972ed 100644
--- a/src/starter/starterwhack.c
+++ b/src/starter/starterwhack.c
@@ -162,10 +162,13 @@ set_whack_end(whack_end_t *w, starter_end_t *end, sa_family_t family)
/* use first address only for pluto */
len = pos - end->srcip;
}
- w->has_srcip = 1;
+ w->has_srcip = !end->has_natip;
ttoaddr(end->srcip, len, v6 ? AF_INET6 : AF_INET, &w->host_srcip);
}
-
+ else
+ {
+ anyaddr(AF_INET, &w->host_srcip);
+ }
w->id = end->id;
w->cert = end->cert;
w->ca = end->ca;