conf: simplify ipv4 regex

use one matching group rather than 3.
This commit is contained in:
rofl0r 2020-10-12 20:04:45 +01:00
parent 86379b4b66
commit 22f059dc5e
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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}))|" \