diff --git a/src/conf.c b/src/conf.c index d40d3a3..0af3c6a 100644 --- a/src/conf.c +++ b/src/conf.c @@ -964,7 +964,7 @@ static HANDLE_FUNC (handle_upstream) ip = get_string_arg (line, &match[mi]); if (!ip) return -1; - mi += 5; + mi += 3; port = (int) get_long_arg (line, &match[mi]); mi += 2; diff --git a/src/conf_regex.h b/src/conf_regex.h index 281e67b..c2d78f9 100644 --- a/src/conf_regex.h +++ b/src/conf_regex.h @@ -16,7 +16,7 @@ #define ALNUM "([-A-Za-z0-9._]+)" #define USERNAME "([^:]*)" #define PASSWORD "([^@]*)" -#define IP "((([0-9]{1,3})\\.){3}[0-9]{1,3})" +#define IP "([0-9]+[.][0-9]+[.][0-9]+[.][0-9]+)" #define IPMASK "(" IP "(/" DIGIT "+)?)" #define IPV6 "(" \ "(([0-9a-fA-F:]{2,39}))|" \