aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-06-15 10:32:15 +0200
committerTobias Brunner <tobias@strongswan.org>2012-06-15 10:46:56 +0200
commit31bcaf604a48b81accae017d674291e7e1b32e2d (patch)
treee56b594d32909623d3e67f6393a3c148067da280
parentaf518b450e3af1961b483a8ced596c6e837989e2 (diff)
downloadstrongswan-31bcaf604a48b81accae017d674291e7e1b32e2d.tar.bz2
strongswan-31bcaf604a48b81accae017d674291e7e1b32e2d.tar.xz
starter: Fixed parsing of %defaultroute.
-rw-r--r--src/starter/confread.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/starter/confread.c b/src/starter/confread.c
index cee9e9d80..671cfbab1 100644
--- a/src/starter/confread.c
+++ b/src/starter/confread.c
@@ -214,12 +214,18 @@ static void kw_end(starter_conn_t *conn, starter_end_t *end, kw_token_t token,
switch (token)
{
case KW_HOST:
- if (value && strlen(value) > 0 && value[0] == '%' &&
- !streq(value, "%any") && !streq(value, "%any4") &&
- !streq(value, "%any6"))
- { /* allow_any prefix */
- end->allow_any = TRUE;
- value++;
+ if (value && strlen(value) > 0 && value[0] == '%')
+ {
+ if (streq(value, "%defaultroute"))
+ {
+ value = "%any";
+ }
+ if (!streq(value, "%any") && !streq(value, "%any4") &&
+ !streq(value, "%any6"))
+ { /* allow_any prefix */
+ end->allow_any = TRUE;
+ value++;
+ }
}
free(end->host);
end->host = strdupnull(value);