starter: Fixed parsing of left|right=%any.
authorTobias Brunner <tobias@strongswan.org>
Tue, 12 Jun 2012 08:12:53 +0000 (10:12 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 12 Jun 2012 08:16:51 +0000 (10:16 +0200)
src/starter/confread.c

index 04c20a2..0496047 100644 (file)
@@ -161,7 +161,9 @@ 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] == '%')
+               if (value && strlen(value) > 0 && value[0] == '%' &&
+                       !streq(value, "%any") && !streq(value, "%any4") &&
+                       !streq(value, "%any6"))
                {       /* allow_any prefix */
                        end->allow_any = TRUE;
                        value++;