summaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2020-09-16 20:39:34 +0100
committerrofl0r <rofl0r@users.noreply.github.com>2020-09-16 21:01:02 +0100
commitcaeab31fcaab5b4fc1985314447c4509f96c7265 (patch)
treecaeaec182e227d3ead63f76f04b83b340bed8ec9 /configure.ac
parent0ad8904b40d699405f60655606db42475c011b67 (diff)
conf.c: simplify the huge IPV6 regex
even though the existing IPV6 regex caught (almost?) all invalid ipv6 addresses, it did so with a huge performance penalty. parsing a file with 32K allow or deny statement took 30 secs in a test setup, after this change less than 3. the new regex is sufficient to recognize all valid ipv6 addresses, and hands down the responsibility to detect corner cases to the system's inet_pton() function, which is e.g. called from insert_acl(), which now causes a warning to be printed in the log if a seemingly valid address is in fact invalid. the new regex has been tested with 486 testcases from http://download.dartware.com/thirdparty/test-ipv6-regex.pl and accepts all valid ones and rejects most of the invalid ones. note that the IPV4 regex already did a similar thing and checked only whether the ip looks like [0-9]+.[0-9]+.[0-9]+.[0-9]+ without pedantry.
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions