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
a37e13c910
Forgot to put src/Makefile.am in source control, lol. Fixes #13 .
2017-11-28 09:27:19 +01: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
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
Sam Hocevar
e35403e112
Minor #ifdef cleanup.
2017-09-06 18:17:33 +02:00
Sam Hocevar
ff3974440e
Get rid of useless refuse() function.
2017-09-06 18:05:25 +02:00
Sam Hocevar
79f2e14e22
Do not always try to write PID file in foreground mode.
...
This sounds like a reasonable default behaviour: if in foreground mode,
AND pidlogfile is not specified in the configuration file, then we most
probably do not want to write a PID file.
2017-09-06 18:02:05 +02:00
Sam Hocevar
00dec123da
Use recvfrom() in UDP listening mode to get remote address.
...
Also move a few #ifdef from .c to .h to make the code slightly more readable.
2017-09-06 17:57:22 +02:00
Sam Hocevar
6909d2c3de
Move connection authorisation logic to a separate function.
2017-09-06 14:56:35 +02:00
Sam Hocevar
b0511c6ab9
Merge branch 'master' into feature-udp-support
2017-09-06 13:01:30 +02:00
Sam Hocevar
7f9f97a963
Count configuration file lines for better error reporting.
2017-09-06 12:57:05 +02:00
Sam Hocevar
7b62e576cf
Reorganise some code for clarity and add license headers.
2017-09-05 17:29:10 +02:00
Sam Hocevar
a613195ad9
Do not call listen() on UDP listeners.
2017-09-05 17:28:04 +02:00
Sam Hocevar
33e8b8d7f9
Start playing around with UDP.
2017-09-05 17:27:16 +02:00
Sam Hocevar
718f4cddf7
Implement a new parser using a PEG grammar.
2017-09-04 20:14:11 +02:00
Sam Hocevar
b3550b8e77
Release 0.63 seems ready.
2017-07-19 19:33:15 +02:00
Sam Hocevar
9cd2114bcb
Rename CHANGES and README to CHANGES.md and README.md.
2017-07-19 19:18:01 +02:00
Sam Hocevar
982c14f46f
Properly handle FD_SET on Windows. Fixes #5 .
...
On Windows, select() ignores its first argument and instead relies on a
slightly different fd_set structure that can hold file descriptors with
arbitrary values. We use the Microsoft recommended way and just increase
FD_SETSIZE at compilation time.
2017-07-19 19:18:01 +02:00
Sam Hocevar
8feb3e0513
Fix a memory corruption in the configuration file parsing. Fixes : #11 .
2017-07-17 11:57:12 +02:00
Sam Hocevar
96d60bcabb
Remove old debug code. Not sure why it was there.
2017-07-05 15:06:24 +02:00
Sam Hocevar
8b071acbe4
Fix a few issues in the Windows port.
2016-02-09 02:28:23 +01:00
Sam Hocevar
cb60037d58
Fix Windows cross-compilation.
...
Test with: ./configure --host=i686-w64-mingw32
2016-02-08 09:20:55 +01:00
Sam Hocevar
a259a67e2d
Fix a probably harmless uninitialised memory access.
2016-02-08 02:49:24 +01:00
Sam Hocevar
c92c0cf4bb
Stop passing server indices around.
...
Also fix a possible file descriptor leak when reloading configuration,
and ensure we no longer reference freed objects after reloading.
2016-02-08 02:36:23 +01:00
Sam Hocevar
53d670f9b1
Some cleaning up in includes and ifdefs.
2016-02-07 00:05:09 +01:00
Sam Hocevar
86cba0ad56
Remove patternBad() and inline its code in its only caller.
2016-02-06 23:35:43 +01:00
Sam Hocevar
e3c2b09c01
Reformat and reorganise CHANGES file with newest entries on top.
2016-02-06 18:45:16 +01:00
Sam Hocevar
65273124f3
Free all memory when quitting, and quit when SIGINT is received.
2016-02-06 18:40:02 +01:00
Sam Hocevar
830b7e5fd1
Allow to shrink the number of connections.
...
This will let us implement clean exit.
2016-02-06 18:31:50 +01:00
Sam Hocevar
f65f4d2506
Pedantic C fixes.
2016-02-06 18:23:50 +01:00
Sam Hocevar
f2d3ecd7f2
Reorganise log categories.
2016-02-06 18:14:14 +01:00
Sam Hocevar
d4c4c99ec7
Move a few declarations and definitions to rinetd.h.
2016-02-06 18:10:44 +01:00
Sam Hocevar
e365bf65f0
Increase buffer size to 16k instead of 1k.
2016-02-06 18:01:36 +01:00