conf: simplify ipv4 regex

use one matching group rather than 3.
This commit is contained in:
rofl0r committed 2020-10-12 20:05:06 +01:00
1 parent 86379b4b66
commit 22f059dc5e
2 files changed
+2 -2

No files matched your search

+1 -1
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;
+1 -1
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}))|" \