tinyproxy/src
rofl0r caeab31fca 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.
2020-09-16 21:01:02 +01:00
..
.gitignore Removed obsolete ignore rules 2008-06-19 21:33:20 +05:30
acl.c acl.c: detect invalid ipv6 string 2020-09-16 21:00:50 +01:00
acl.h make acl lookup 450x faster by using sblist 2020-09-07 22:09:35 +01:00
anonymous.c replace leftover users of hashmap with htab 2020-09-15 23:12:00 +01:00
anonymous.h replace leftover users of hashmap with htab 2020-09-15 23:12:00 +01:00
base64.c move base64 code into own file 2018-02-06 16:57:02 +00:00
base64.h move base64 code into own file 2018-02-06 16:57:02 +00:00
basicauth.c basicauth: use sblist 2020-09-16 02:39:09 +01:00
basicauth.h basicauth: use sblist 2020-09-16 02:39:09 +01:00
buffer.c buffer: fix log message in read_buffer(). 2013-11-23 12:21:59 +01:00
buffer.h Convert tabs to spaces 2008-12-08 13:39:44 +00:00
child.c listen_addrs: use sblist 2020-09-16 02:39:09 +01:00
child.h listen_addrs: use sblist 2020-09-16 02:39:09 +01:00
common.h configure: do not check for standard POSIX headers 2016-12-21 21:01:37 +00:00
conf.c conf.c: simplify the huge IPV6 regex 2020-09-16 21:01:02 +01:00
conf.h remove vector remains 2020-09-16 02:39:09 +01:00
connect-ports.c connect_ports: use sblist 2020-09-16 02:39:09 +01:00
connect-ports.h connect_ports: use sblist 2020-09-16 02:39:09 +01:00
conns.c refactor conns.[ch], put conn_s into child struct 2020-09-15 23:12:00 +01:00
conns.h refactor conns.[ch], put conn_s into child struct 2020-09-15 23:12:00 +01:00
daemon.c daemon.c: fix #if NDEBUG --> #ifdef NDEBUG 2009-11-10 17:59:40 +01:00
daemon.h Reformat code to GNU coding style 2008-12-01 15:01:11 +00:00
filter.c filter: reduce memory usage, fix OOM crashes 2020-09-05 19:42:34 +01:00
filter.h filter: reduce memory usage, fix OOM crashes 2020-09-05 19:42:34 +01:00
heap.c simplify codebase by using one thread/conn, instead of preforked procs 2019-12-21 00:43:45 +00:00
heap.h simplify codebase by using one thread/conn, instead of preforked procs 2019-12-21 00:43:45 +00:00
hsearch.c hsearch: add seed to prevent another CVE-2012-3505 instance 2020-09-15 23:12:00 +01:00
hsearch.h save headers in an ordered dictionary 2020-09-15 23:11:59 +01:00
html-error.c replace leftover users of hashmap with htab 2020-09-15 23:12:00 +01:00
html-error.h add_new_errorpage(): fix segfault accessing global config 2020-09-12 21:38:04 +01:00
http-message.c Indent code to Tinyproxy coding style 2009-09-15 01:11:25 +05:30
http-message.h http_message_add_headers: make argument num_headers unsigned 2009-08-07 09:24:32 +02:00
log.c log_message_storage: use sblist 2020-09-16 02:39:09 +01:00
log.h make send_stored_logs static 2018-02-25 18:35:34 +00:00
loop.c free() loop records too 2020-09-15 23:12:00 +01:00
loop.h free() loop records too 2020-09-15 23:12:00 +01:00
main.c move config reload message to reload_config() 2020-09-16 21:00:04 +01:00
main.h remove duplicate code calling reload_config_file() 2020-01-15 16:35:43 +00:00
Makefile.am remove vector remains 2020-09-16 02:39:09 +01:00
mypoll.c use poll() where available 2020-09-15 23:12:00 +01:00
mypoll.h use poll() where available 2020-09-15 23:12:00 +01:00
network.c safe_write/read: take void* buffer for generic use 2017-12-04 11:33:01 +00:00
network.h safe_write/read: take void* buffer for generic use 2017-12-04 11:33:01 +00:00
orderedmap.c save headers in an ordered dictionary 2020-09-15 23:11:59 +01:00
orderedmap.h save headers in an ordered dictionary 2020-09-15 23:11:59 +01:00
reqs.c remove vector remains 2020-09-16 02:39:09 +01:00
reqs.h refactor conns.[ch], put conn_s into child struct 2020-09-15 23:12:00 +01:00
reverse-proxy.c save headers in an ordered dictionary 2020-09-15 23:11:59 +01:00
reverse-proxy.h save headers in an ordered dictionary 2020-09-15 23:11:59 +01:00
sblist.c simplify codebase by using one thread/conn, instead of preforked procs 2019-12-21 00:43:45 +00:00
sblist.h simplify codebase by using one thread/conn, instead of preforked procs 2019-12-21 00:43:45 +00:00
sock.c listen_fds: use sblist 2020-09-16 01:05:58 +01:00
sock.h listen_fds: use sblist 2020-09-16 01:05:58 +01:00
stats.c free a mem leak by statically allocating global statsbuf 2020-09-15 23:28:33 +01:00
stats.h Indent code to Tinyproxy coding style 2009-09-15 01:11:25 +05:30
text.c Indent code to Tinyproxy coding style 2009-09-15 01:11:25 +05:30
text.h Reformat code to GNU coding style 2008-12-01 15:01:11 +00:00
transparent-proxy.c listen_addrs: use sblist 2020-09-16 02:39:09 +01:00
transparent-proxy.h save headers in an ordered dictionary 2020-09-15 23:11:59 +01:00
upstream.c upstream: fix ip/mask calculation for types other than none 2020-09-07 16:11:51 +01:00
upstream.h rename members of proxy_type enum to have a common prefix 2018-02-25 23:52:23 +00:00
utils.c Use correct format string for POSIX pid_t in pidfile_create() 2009-09-27 08:09:24 +05:30
utils.h Convert tabs to spaces 2008-12-08 13:39:44 +00:00