From ff41ca0dc44a87047372386d3a481eb7030cc6d1 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Sun, 13 Apr 2008 21:42:44 +0000 Subject: [PATCH] host_srcip was not properly initialized in starterwhack.c --- src/starter/starterwhack.c | 7 +++++-- 1 file 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;