From: Tobias Brunner Date: Fri, 15 Jun 2012 08:32:15 +0000 (+0200) Subject: starter: Fixed parsing of %defaultroute. X-Git-Tag: 5.0.0~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31bcaf604a48b81accae017d674291e7e1b32e2d;p=thirdparty%2Fstrongswan.git starter: Fixed parsing of %defaultroute. --- diff --git a/src/starter/confread.c b/src/starter/confread.c index cee9e9d80b..671cfbab15 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);