starter: Fixed parsing of left|right=%any.
[strongswan.git] / 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++;