Commit Graph

138 Commits

Author SHA1 Message Date
Sam Hocevar
3b33f45925 Merge branch 'feature-ipv6-support' into main 2021-02-14 11:41:54 +01:00
Sam Hocevar
878c804d32 Update changelog for upcoming version 0.71. 2021-02-14 11:39:04 +01:00
Sam Hocevar
f9f5aeda80 Properly release the lexer context after reading the configuration. 2021-02-14 11:20:37 +01:00
Sam Hocevar
655584ad78 Fix a format string issue on Windows. 2021-02-14 10:10:47 +01:00
Sam Hocevar
4c5a7a1a22 Fix deny/allow rules to support IPv6 addresses. 2021-02-14 10:08:09 +01:00
Sam Hocevar
7790a617d8 Remove all legacy IPv4 code. 2021-02-14 10:08:09 +01:00
Sam Hocevar
7781e97734 Remove deprecated getAddress() function now that we use getaddrinfo() ubiquitously. 2021-02-14 09:18:49 +01:00
Sam Hocevar
79bafee414 Allow connecting to remote IPv6 addresses. 2021-02-14 09:18:07 +01:00
Sam Hocevar
b7fcf65a97 Use getaddrinfo() to resolve source address. 2021-02-14 08:45:03 +01:00
Sam Hocevar
c9de417f2e Use sockaddr_storage for IPv6 compatibility. 2021-02-14 08:45:03 +01:00
Sam Hocevar
26b0e63bf5 Get rid of useless fromProtocol struct member. 2021-02-14 08:45:03 +01:00
Sam Hocevar
f58db7ea8d Add a helper function to retrieve socket type from protocol. 2021-02-14 08:09:08 +01:00
Sam Hocevar
7ef50421c0 Remove the protocolType enum in favour of IPPROTO_TCP/IPPROTO_UDP. 2021-02-14 08:06:02 +01:00
Sam Hocevar
0ef4f1042f Add a helper function to retrieve port from addrinfo. 2021-02-14 07:53:40 +01:00
Sam Hocevar
f7cd21f91f Fix getaddrinfo() hint initialisation issues. 2021-02-14 07:51:46 +01:00
Sam Hocevar
a5905bbcea Fix Windows build. 2021-02-14 00:52:15 +01:00
Sam Hocevar
a1d2c297ba Merge branch 'main' into feature-ipv6-support 2021-02-13 23:11:35 +01:00
Sam Hocevar
5a70f2bf4e Allow to build application with Visual Studio. 2021-02-13 23:02:03 +01:00
Sam Hocevar
7e287f5913 Create log file if it does not exist already. 2021-02-13 21:52:15 +01:00
Sam Hocevar
4f64342ed5 Allow listening on IPv6 addresses. 2021-02-13 21:48:51 +01:00
Sam Hocevar
44f973d9fd Allow DNS labels to start with an underscore. 2021-02-13 18:43:33 +01:00
Sam Hocevar
a8ca595620 Merge branch 'master' into feature-ipv6-support 2021-02-13 12:52:44 +01:00
Sam Hocevar
2f8fd87518 Allow hostnames to start with a ‘_’, e.g. ‘_http.example.com’. 2021-02-13 12:15:39 +01:00
Sam Hocevar
04d1b74e24 Allow service names that contain dashes, e.g. snmp-trap. 2021-02-13 12:02:27 +01:00
Sam Hocevar
2681d17eb4 Fix minor compilation warnings on mingw64. 2021-02-13 11:44:26 +01:00
Sam Hocevar
8bde6f6259 Distribute COPYING file with source tarballs. 2021-01-08 18:41:05 +01:00
Sam Hocevar
ae9af9d030 Add GPLv2 license text. Fixes #19. 2021-01-08 18:39:12 +01:00
Sam Hocevar
ebd31cc72e Improve code readability by using enum typedefs. 2019-07-05 10:35:39 +02:00
Sam Hocevar
da497404ab Use uint64_t for data usage statistics.
It’s not uncommon nowadays that a single connection uses more than 2GiB
of data. This bug was only affecting logging and did not affect proper
behaviour of the program.
2019-07-05 10:28:46 +02:00
Sam Hocevar
d9f661ee5d Use uint16_t for port numbers.
This cleans up the mix of int and unsigned short for these variables.
2019-07-05 10:14:15 +02:00
Sam Hocevar
0ea83281e3 Merge branch 'master' into feature-ipv6-support 2017-11-28 09:33:48 +01:00
Sam Hocevar
a37e13c910 Forgot to put src/Makefile.am in source control, lol. Fixes #13. 2017-11-28 09:27:19 +01:00
Sam Hocevar
3e18951d7a Merge branch 'master' into feature-ipv6-support 2017-09-11 19:28:53 +02:00
Sam Hocevar
9d140d8f87 Move C source files to an src/ subdirectory.
It was a bit crowded in here. This makes the source tree a bit nicer.
2017-09-11 19:25:26 +02:00
Sam Hocevar
b5f75eae99 Version 0.70. 2017-09-09 19:28:12 +02:00
Sam Hocevar
be9f46e7f1 Rewrite a lot of the documentation. 2017-09-09 19:25:06 +02:00
Sam Hocevar
dd17267afe Start working on IPv6 support. 2017-09-08 19:42:18 +02:00
Sam Hocevar
5d0e44c451 Support for source address binding.
This feature was independently implemented by SuSE as part of the changes in
https://build.opensuse.org/package/view_file/server:proxy/rinetd/rinetd-syslog.patch?expand=1
and as mentioned in #9, but our new configuration parser makes the change a
lot less intrusive.
2017-09-08 19:22:19 +02:00
Sam Hocevar
173a738be0 Fix regression: hostnames in bind address were broken. 2017-09-08 19:12:53 +02:00
Sam Hocevar
37437a5c5b Improve UDP connection handling.
Send a zero-sized UDP packet when first accessing the server; this makes
TCP→UDP→TCP redirects work in both directions.

Properly close UDP connections when the other end disconnects (TCP) or
timeouts (UDP).
2017-09-08 13:28:09 +02:00
Sam Hocevar
b833d456dd Fix “make dist” by adding a few missing filenames. 2017-09-08 13:10:53 +02:00
Sam Hocevar
f64f42ba81 Merge branch 'feature-udp-support'. Closes #8. 2017-09-08 13:02:13 +02:00
Sam Hocevar
efc3474d1b Add proper destination address when answering an UDP client. 2017-09-08 12:56:48 +02:00
Sam Hocevar
f04eada6a9 Add UDP client timeout support. 2017-09-08 12:56:45 +02:00
Sam Hocevar
17d17e233b Merge some code into a new net.c source file. 2017-09-07 17:13:58 +02:00
Sam Hocevar
6750f65c35 Only call set FIONBIO on TCP sockets. 2017-09-07 17:04:05 +02:00
Sam Hocevar
6bb27c18a6 Support multiple UDP clients with connection tracking.
If an incoming UDP packet shares the same host and source port as
an existing connection, we consider it part of the input stream.
2017-09-07 16:29:23 +02:00
Sam Hocevar
b5206eab4e Add \n to all syslog calls because on Windows it will use fprintf. 2017-09-07 13:26:04 +02:00
Sam Hocevar
759cd83724 Use BUILT_SOURCES, not GENERATED_SOURCES. 2017-09-07 12:11:06 +02:00
Sam Hocevar
577a3be97a Improve code clarity in get_gmtoff(). 2017-09-06 18:19:57 +02:00