| 1 |
---------------------------------------------------------------------- |
| 2 |
Version 1.12.0 - 2025-09-08 |
| 3 |
- API: add ability to communicate source port back to caller |
| 4 |
This is handled via a new "on connection" callback |
| 5 |
- tcp: tcp: avoid deprecated ENGINE_cleanup |
| 6 |
ENGINE_cleanup is deprecated as of OpenSSL 1.1.0, and may not be available |
| 7 |
with 3.0 and OPENSSL_NO_ENGINE. |
| 8 |
Thanks to Yaakov Selkowitz for the patch. |
| 9 |
- relp: fix build against `gcc-14` (`-Werror=calloc-transposed-args`) |
| 10 |
`gcc-14` added a new `-Wcalloc-transposed-args` warning. It |
| 11 |
detected minor infelicity in `calloc()` API usage |
| 12 |
Fixes |
| 13 |
../../git/src/relp.c: In function 'addToEpollSet': |
| 14 |
../../git/src/relp.c:101:39: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] |
| 15 |
101 | CHKmalloc(epd = calloc(sizeof(epolld_t), 1)); |
| 16 |
Thanks to Khem Raj for the patch. |
| 17 |
- tests: Include missing sys/time.h |
| 18 |
This is found when building for musl C library systems where sys/time.h |
| 19 |
is not included indirectly and select() and timeval structs are used |
| 20 |
Thanks to Khem Raj for the patch. |
| 21 |
- bugfix: code adapted to C23 (as used in gcc 15 by default) |
| 22 |
Thanks to Khem Raj for the patch. |
| 23 |
---------------------------------------------------------------------- |
| 24 |
Version 1.11.0 - 2023-01-10 |
| 25 |
- bugfix: function inline errors in debug optimization (-Og) |
| 26 |
Compiler does not inline any functions when using debug |
| 27 |
optimization (-Og). Hence, remove -Winline flag when compiling with |
| 28 |
debug optimization. |
| 29 |
Thanks to Yash Shinde for the patch. |
| 30 |
- CI: upgrading to newer ubuntu version as required by github |
| 31 |
we used older ubuntu versions as base for our containers, these |
| 32 |
versions are no longer available in github actions. As such, |
| 33 |
we upgraded. Has no effect on testbench as we execute everything |
| 34 |
in container environment and container remains the same. |
| 35 |
- tcp: fix some compiler warnings with enable-tls-openssl |
| 36 |
When --enable-tls=no and --enable-tls-openssl=yes, the following |
| 37 |
compiler errors were reported. |
| 38 |
Thanks to Patrick Williams for the patch. |
| 39 |
- code cleanup |
| 40 |
During the initial librelp implementation it was thought about an |
| 41 |
auto-retry feature (whatever that means). Variable bAutoRetry was |
| 42 |
created to control that behaviour. It's default was 0 (inactive). |
| 43 |
Some code has been written to evaluate that variable and act |
| 44 |
accordingly. However, no setter method for this variable was |
| 45 |
created and it was also nowhere changed from the default value |
| 46 |
of zero. As such, the code activated by it was never used. |
| 47 |
This patch now removes both the variable and the few code lines |
| 48 |
accessing it. This will have no effect, as the code was never |
| 49 |
used. |
| 50 |
closes: https://github.com/rsyslog/librelp/issues/223 |
| 51 |
- testbench: Fix commands in some openssl tests |
| 52 |
Those commands were not correctly handeled on AIX, now they are. |
| 53 |
- AIX: Changed ERRNO handling after connect in tcp.c |
| 54 |
see also: https://github.com/rsyslog/librelp/issues/250 |
| 55 |
- AIX: Add handling for other ERRNO codes in tcp.c |
| 56 |
For send(), recv() and connect() we need to handle different ERRNO |
| 57 |
codes on AIX according to doc: |
| 58 |
https://www.ibm.com/docs/en/aix/7.1?topic=r-recv-subroutine |
| 59 |
https://www.ibm.com/docs/en/aix/7.1?topic=s-send-subroutine |
| 60 |
https://www.ibm.com/docs/en/aix/7.1?topic=c-connect-subroutine |
| 61 |
- bugfix/TCP: relpTcpGetRtryDirection onyl needs to check direction if SSL is active. |
| 62 |
closes: https://github.com/rsyslog/librelp/issues/240 |
| 63 |
- AIX: in relpTcpRcv we need to set RETRY_recv if errno is 0 |
| 64 |
On AIX 10.x, when a recv call fails with len -1 and errno 0 |
| 65 |
we can still go into relpTCP_RETRY_recv mode. Testbench on |
| 66 |
rsyslog side appears to be finally working with this fix. |
| 67 |
On AIX 10.x, same problem as above appear to happen with |
| 68 |
connect() as well not setting errno to EINPROGRESS on failure. |
| 69 |
rsyslog ptcp driver does not check errno value at all, which is |
| 70 |
why we did not have this problem on AIX with rsyslog. |
| 71 |
Reduce test message count in receiver-abort.sh to 50000, |
| 72 |
because otherwise the test can timeout on very slow machines. |
| 73 |
Moved receive buffer in relpSessRcvData back to stack memory |
| 74 |
closes: https://github.com/rsyslog/librelp/pull/239 |
| 75 |
- openssl: fix openssl exit code avoid double free of ctx |
| 76 |
When more than one librelp instance are used in the same process, |
| 77 |
and the relpTcpExitTLS call was called a second time, the process |
| 78 |
could freeze due a double free (See SSL_CTX_free call). |
| 79 |
Thanks to David GOUARIN <[email protected]> for the |
| 80 |
discovery and initial fix. |
| 81 |
Also added an openssl instance counter to avoid freeing the SSL library |
| 82 |
which could be still in use by another librelp instance |
| 83 |
in the same process. |
| 84 |
closes: https://github.com/rsyslog/librelp/issues/235 |
| 85 |
- librelp hardening: Fix multiple minor issues causing debugging trouble |
| 86 |
- avoid invalid dbgprint calls |
| 87 |
- avoid double free in relpTcpDestruct (if called twice). |
| 88 |
- add debug output into relpTcpRcv |
| 89 |
- OpenSSL: fix depreacted API issues for OpenSSL 3.x |
| 90 |
- OpenSSL error strings are loaded automatically now |
| 91 |
- Adapted Debug Callback for 3.x |
| 92 |
- See for more: |
| 93 |
https://www.openssl.org/docs/manmaster/man7/migration_guide.html |
| 94 |
closes: https://github.com/rsyslog/librelp/issues/246 |
| 95 |
- bugfix: compatiblity problem with openssl 1.1 |
| 96 |
There were undefined reference to CRYPTO_set_id_callback if system |
| 97 |
use openssl 1.1, which lead to load and/or other erros. |
| 98 |
Thanks to Alexander Eremin for the patch. |
| 99 |
- bugfix: Forward return code from relpEngineSetTLSLib to relpEngineSetTLSLibName |
| 100 |
Previous situation: In case librelp is compiled without openssl |
| 101 |
support but openssl is requested from the user side, then librelp |
| 102 |
silently switches to the default tls driver(gnutls). |
| 103 |
Thanks to Attila Lakatos for the patch. |
| 104 |
- bugfix: make relpEngineSetTLSLib debug safe |
| 105 |
In case pThis == NULL condition is true at line |
| 106 |
https://github.com/rsyslog/librelp/blob/master/src/relp.c#L345 |
| 107 |
pThis->dbgprint(...) would cause unexpected behavior. |
| 108 |
Thanks to Attila Lakatos for the patch. |
| 109 |
- bugfix: warnings reported by coverity scan |
| 110 |
Thanks to Attila Lakatos for the patch. |
| 111 |
- testbench: Added compatiblity to run on AIX |
| 112 |
- removed long options from receive send utilities (Not supported on AIX). |
| 113 |
- added checks for existing commands in some tests. |
| 114 |
- added msleep utility from rsyslog (sleep, timeout etc. not supported on AIX). |
| 115 |
- github workflow: Disabled some unrelated tests from rsyslog testbench |
| 116 |
closes: https://github.com/rsyslog/librelp/issues/228 |
| 117 |
- gnutls drvr bugfix: library called exit() under some circumstances |
| 118 |
When relpTcpRcv ran into an error, it could call exit() and thus |
| 119 |
terminate the calling process. This was a regression from commit |
| 120 |
6555545c4ebe9afe9259b15c176fd81eeecc93f4. |
| 121 |
closes: https://github.com/rsyslog/librelp/issues/230 |
| 122 |
---------------------------------------------------------------------- |
| 123 |
Version 1.10.0 - 2021-02-16 |
| 124 |
- TLS handling bugfix |
| 125 |
When the client tried to conntect to the server, custom |
| 126 |
cipherstrings (Set by tlscommands feature) were not used. This |
| 127 |
could lead to the negotiation of different and potentially weaker |
| 128 |
ciphers. Other custom tlscommands settings like Protocol where not |
| 129 |
affected. We do not overwrite the custom ciphers anymore if they are |
| 130 |
set by tlscommands. Another problem only related to the relp |
| 131 |
receiver (server) was, that the custom tlscommands/priority string |
| 132 |
where not applied on the accepted client connections. This could |
| 133 |
lead to the same problem as the default ciphers were used. |
| 134 |
Besides the main problem, the following changes were applied: |
| 135 |
- Add new testcase for setting custom tls ciphers in tlscommand. |
| 136 |
- Add support to use semicolon (;) as tlscommand seperator (See new testcase) |
| 137 |
- Fix GCC9 "destination size" warning in offers.c |
| 138 |
closes: https://github.com/rsyslog/librelp/issues/224 |
| 139 |
---------------------------------------------------------------------- |
| 140 |
Version 1.9.0 - 2020-11-24 |
| 141 |
- openssl bugfix: preprocessor check for tlsconfigcmd code |
| 142 |
tls config commands no is compiled for OpenSSL 1.0.2. |
| 143 |
closes: https://github.com/rsyslog/librelp/issues/221 |
| 144 |
- solaris compatibility fix: add strndup compatibility code |
| 145 |
On some platforms, strndup() is not present. However, it was used |
| 146 |
in "tlsconfigcmd" command processing. This bug was unlikely to |
| 147 |
trigger as the platforms in question had either non-appropriate |
| 148 |
openssl library versions or were affected by the openssl version |
| 149 |
check bug (see above). |
| 150 |
---------------------------------------------------------------------- |
| 151 |
Version 1.8.0 - 2020-09-29 |
| 152 |
- gnutls "bugfix": handle receives who break connection on close |
| 153 |
Some TLS servers don't reply to graceful shutdown requests "for |
| 154 |
optimization". This can lead to librelp keeping the connection |
| 155 |
for ever and thus effectively to hang on it. |
| 156 |
This patch is modelled after a similiar patch by Renaud Métrich |
| 157 |
for rsyslog. |
| 158 |
see also https://github.com/rsyslog/rsyslog/pull/4424 |
| 159 |
- gnutls bugfix: per-session memory leak |
| 160 |
Depending on callig sequence and use, there were two memory leaks |
| 161 |
which could cause operational issues for long-running processes. |
| 162 |
This was primarily a problem for sender processes (and not listeners) |
| 163 |
closes: https://github.com/rsyslog/librelp/issues/194 |
| 164 |
- tls bugfix: RETRY not correctly handled in TLS Mode & CI improvement |
| 165 |
Relp session handling did not honor rtryOP status correctly, |
| 166 |
instead it was checkong for errno=EAGAIN only. |
| 167 |
This patch comes with a number of smaller patches, unfortunately |
| 168 |
all rolled into a single commit. |
| 169 |
- CI: Add centos8 / fedora30 workflows. |
| 170 |
- CI: Switch rsyslog workflow to ubuntu-20.04 |
| 171 |
- CI: Imported run-ci script from rsyslog |
| 172 |
- Fix multiple issue found with -Werror=missing-declarations (fedora30). |
| 173 |
- openssl: Fix error output for all error cases |
| 174 |
- testbench: Add test for tls basic with mixed tls libs |
| 175 |
- testbench: fix python3 compatibility issues |
| 176 |
- testbench: fix parallel tests for receiver-abort.sh and other tests. |
| 177 |
- testbench: Added extra debug output to send.c utility. |
| 178 |
closes: https://github.com/rsyslog/librelp/issues/207 |
| 179 |
- testbench: obtain python binary path via AM_PATH_PYTHON |
| 180 |
closes: https://github.com/rsyslog/librelp/issues/214 |
| 181 |
- bugfix: librelp.h contains duplicate function definition |
| 182 |
- removed some more externally visible symbols not being part of API |
| 183 |
- testbench tooling improvements |
| 184 |
- distcheck bugfix: add missing testbench cert files |
| 185 |
closes: https://github.com/rsyslog/librelp/issues/206 |
| 186 |
---------------------------------------------------------------------- |
| 187 |
Version 1.7.0 - 2020-08-25 |
| 188 |
- some internal cleanup (const attributes and such) |
| 189 |
- bugfix: library did export non-API symbols |
| 190 |
closes https://github.com/rsyslog/librelp/issues/187 |
| 191 |
- openssl: Fix chained certificate files for older OpenSSL Version. |
| 192 |
For older OpenSSL Versions, we are loading the Own Certfile |
| 193 |
(Which can be chained) into CTX Verify locations. This enables |
| 194 |
chained certificates for older OpenSSL Versions as well |
| 195 |
devtools: updated devcontainer.sh (based on rsyslog version) |
| 196 |
see also: https://github.com/rsyslog/librelp/issues/195 |
| 197 |
- fix FD leak when socket shutdown is one-sided |
| 198 |
AWS LB has timeouts when connection is inactive and when this |
| 199 |
happens, AWS LB shuts down socket from one-side only. When rsyslog |
| 200 |
detects one-sided shutdown, it assumes that connection is closed |
| 201 |
while it isn't. The connection is left unclosed and unclosed FD |
| 202 |
are piling up, eventually filling up FD number space. |
| 203 |
Thanks to Ognyan Kulev for the patch. |
| 204 |
- TLS: Added call to destruct OpenSSL remains to relpEngineDestruct |
| 205 |
For a clean cleanup, OpenSSL remains are now being removed at the end |
| 206 |
of relpEngineDestruct() |
| 207 |
closes: https://github.com/rsyslog/librelp/issues/199 |
| 208 |
- fix memory leak on session break |
| 209 |
When librelp session breaks unexpected, a memory leak could happen in sendq.c |
| 210 |
when relpSendqeConstruct was called before the session break happened. |
| 211 |
- Also Adds a new valgrind test basic-sessionbreak-vg.sh to reproduce |
| 212 |
the problem. without the fix, the test will fail. |
| 213 |
- Adjusted testbench plumbing to support session break valgrind test. |
| 214 |
closes: https://github.com/rsyslog/librelp/issues/188 |
| 215 |
---------------------------------------------------------------------- |
| 216 |
Version 1.6.0 - 2020-04-21 |
| 217 |
- fix namespace pollution - some non-API functions were exported |
| 218 |
While fixing this, also some internal inconsistencies in function |
| 219 |
visibility were fixed as well. |
| 220 |
closes https://github.com/rsyslog/librelp/issues/179 |
| 221 |
- replsess: fix double free of sendbuf in some cases. |
| 222 |
In iRet handler of relpSessSendResponse, the sendbuf |
| 223 |
was freed if iRet returned a failure. |
| 224 |
However if error RELP_RET_IO_ERR happened in relpSendqAddBuf, |
| 225 |
sendbuf was already assigned to relpSendqe_t. As a result |
| 226 |
sendbuf was double freed in relpSendqDestruct. |
| 227 |
see also |
| 228 |
https://github.com/rsyslog/rsyslog/issues/4184 |
| 229 |
https://github.com/rsyslog/rsyslog/issues/4005 |
| 230 |
closes https://github.com/rsyslog/librelp/issues/183 |
| 231 |
- improve support for libressl |
| 232 |
LibreSSL has no support for @SECLEVEL and SSL_CONF_CTX_set_flags(). |
| 233 |
LibreSSL is now detected and some functionality disabled if it is |
| 234 |
used. |
| 235 |
Thanks to Remi Locherer for the patch. |
| 236 |
- Modified GnuTLS priority according to standard crypto-policy guideline |
| 237 |
Edited TLS priority string default to conform to system-wide default |
| 238 |
and align librelp behavior with other crypto-utilizing packages. |
| 239 |
Note: this may be different from what the openSSL driver does. |
| 240 |
Thanks to Jiri Vymazal for the patch. |
| 241 |
- tcp: Missing pUsr Copy to relpTcp Pointer fixed in relpTcpAcceptConnReq |
| 242 |
The userpointer was not copied into the relpTcp object. |
| 243 |
Also fixed core dump crash in receive / send helpers when userpointer |
| 244 |
is returned NULL from librelp. |
| 245 |
- report io errors for plain tcp connections |
| 246 |
this already happens with TLS, but not with plain tcp. Error messages |
| 247 |
are a useful troubleshooting tool. |
| 248 |
---------------------------------------------------------------------- |
| 249 |
Version 1.5.0 - 2020-01-14 |
| 250 |
- bugfix: too late termination of relp Engine on shutdown |
| 251 |
When librelp is instructed to shutdown, it processes messages |
| 252 |
still present inside its receive buffers. It only terminates |
| 253 |
when it needs to wait for new data to arrive. |
| 254 |
Depending on RELP and TCP window size and message length, |
| 255 |
this may cause many messages to be processed while in shutdown. |
| 256 |
Even with default settings, up to 128 messages may be taken off |
| 257 |
the wire and be processed. |
| 258 |
This is a problem regarding the shutdown timing of a librelp |
| 259 |
user (e.g. rsyslog). It may take unexpectedly long to shutdown |
| 260 |
the RELP component and as such timeout may occur in the caller |
| 261 |
code. This is especially the case if the caller does lengthy |
| 262 |
processing when a RELP message is received. Note: It is |
| 263 |
perfectly fine for a caller to do this. The problem is that |
| 264 |
librelp continues to provide new data for a relatively long |
| 265 |
and unexpected period. |
| 266 |
This fix ensure that the relp engine shuts down much quicker |
| 267 |
when shutdown is requested. It now also checks the shutdown |
| 268 |
request while processing already received buffer data. |
| 269 |
This problem was detected when working on |
| 270 |
see also https://github.com/rsyslog/rsyslog/issues/3941 |
| 271 |
closes https://github.com/rsyslog/librelp/issues/175 |
| 272 |
- build system fix: invalid default in configure help text |
| 273 |
closes https://github.com/rsyslog/librelp/issues/169 |
| 274 |
- error message on invalid TLS library request added |
| 275 |
This way an invalid TLS library (name) can be detected and the |
| 276 |
error presented to the user. So far, invalid library names were |
| 277 |
hard to find. |
| 278 |
---------------------------------------------------------------------- |
| 279 |
Version 1.4.0 - 2019-03-05 |
| 280 |
NOTE TO PACKAGERS: |
| 281 |
Both openssl and GnuTLS are now enabled by default. This is to |
| 282 |
enable apps to choice which of the two drivers they want to use. |
| 283 |
If you want to disable one or both of the drivers, use |
| 284 |
--disable-tls to disable GnuTLS (option name is historic) |
| 285 |
--disable-tls-openssl to disable openssl |
| 286 |
|
| 287 |
- build system: enable openssl by default, this means both TLS drivers |
| 288 |
are now build by default |
| 289 |
- support that both GnuTLS and openssl TLS drivers are active together |
| 290 |
This permits the caller to select which one to use via a NEW API |
| 291 |
relpEngineSetTLSLibByName() and relpEngineSetTLSLib(). |
| 292 |
- portability: use GCC __attribute__ only where supported |
| 293 |
- bugfix: build problem when HAVE_STRERROR_R is undefined |
| 294 |
Thanks to Paul Cameron for the fix. |
| 295 |
- bugfix: openssl driver did not properly handle retries when sending |
| 296 |
Every TLS library can request i/o call retry if in non-blocking mode. |
| 297 |
When sending, the openssl driver did not properly handle this. |
| 298 |
Note: the GnuTLS driver was not affected by this bug. |
| 299 |
- bugfix: in openssl mode, cert name validation did not work properly |
| 300 |
closes https://github.com/rsyslog/librelp/issues/149 |
| 301 |
- bugfix: invalid handling of connection fail could lead to abort |
| 302 |
... or more precisely to SIGPIPE on the sender app. What exactly happens |
| 303 |
in that case depends on SIGPIPE handling in the sender. This is of course |
| 304 |
not acceptable or desired behaviour. This patch fixes it. |
| 305 |
This commit also includes testbench improvements, especially in regard |
| 306 |
to support easier diagnostic of such cases. |
| 307 |
closes https://github.com/rsyslog/librelp/issues/161 |
| 308 |
- tests: make dummyclient.py compatible with Python2 and Python3 |
| 309 |
closes: https://github.com/rsyslog/librelp/issues/163 |
| 310 |
Thanks to whissi for the patch. |
| 311 |
- a couple of minor and cosmetic nitfixes, improvements and cleanup |
| 312 |
---------------------------------------------------------------------- |
| 313 |
Version 1.3.0 - 2018-12-11 |
| 314 |
- improved error reporting |
| 315 |
- bugfix openssl: anon mode did not work with openssl 1.1.0+ |
| 316 |
This was caused by "hardening" inside openssl, so not a real bug. |
| 317 |
- bugfix: do not send multiple open commands |
| 318 |
multiple open commands can happen when a session was broken |
| 319 |
and is being reestablished. Chances to experience this problem |
| 320 |
increase with the number of sessions broken in a row. A trigger |
| 321 |
is that the remote system accepts the TCP connection, but does |
| 322 |
NOT send a response to the "open" command (aka "very short-lived |
| 323 |
session). This can happen e.g. with proxy servers which cannot |
| 324 |
connect to the actual server. |
| 325 |
closes https://github.com/rsyslog/librelp/issues/129 |
| 326 |
- bugfix testbench: TLS tests were executed even when TLS was disabled |
| 327 |
- testbench: |
| 328 |
* add test for receiver abort and restart |
| 329 |
* much improved testbench framework and tools to support |
| 330 |
this type of test. Done some general improvements to the |
| 331 |
tooling. |
| 332 |
* imported rsyslog tool "chkseq" for checking |
| 333 |
---------------------------------------------------------------------- |
| 334 |
Version 1.2.18 - 2018-09-18 |
| 335 |
- added non-standard "certvalid" auth mode to TLS authentication |
| 336 |
- bugfix CI: make distcheck did not work |
| 337 |
---------------------------------------------------------------------- |
| 338 |
Version 1.2.17 - 2018-08-02 |
| 339 |
- added support for openssl |
| 340 |
now, at configure time, openssl (--enable-tls-openssl) or gnutls |
| 341 |
(--enable-tls) can be enabled. Openssl is recommended as it permits |
| 342 |
better error messages and has more robust certificate handling, |
| 343 |
but the default remains gnutls so that packagers do not need to |
| 344 |
change without specific need. |
| 345 |
Note: if openssl is selected, setting the gnutls priority string |
| 346 |
does not have any effect. This will be worked on in later releases. |
| 347 |
- improve code quality: replace strerror() by portable equivalent |
| 348 |
- improve error message on connection failure |
| 349 |
it now contains the OS-provided error message |
| 350 |
Thanks to Justin Azoff for the patch. |
| 351 |
- bugfix: 100% CPU utilization due to busy loop |
| 352 |
happend because EAGAIN was not properly handled |
| 353 |
Thanks to Lex Neva for the patch. |
| 354 |
closes https://github.com/rsyslog/librelp/issues/13 |
| 355 |
- bugfix: do not expose symbols that are not part of public API |
| 356 |
Some other symbols were exported. Now only symbols starting with |
| 357 |
"relp" are exported. |
| 358 |
Thanks to Michael Biebl for the patch. |
| 359 |
- bugfix: potential segfault when listener could not be bound |
| 360 |
This was fixed as a side-effect of refactoring some static analyzer |
| 361 |
warnings, exact commit is not flagged. |
| 362 |
see also https://github.com/rsyslog/rsyslog/issues/2874 |
| 363 |
---------------------------------------------------------------------- |
| 364 |
Version 1.2.16 - 2018-05-14 |
| 365 |
- API changes |
| 366 |
* add new API: relpSrvSetOversizeMode() |
| 367 |
This permits to tell librelp how to handle oversize messages. |
| 368 |
Traditionally (and now default), this aborts the session. We now |
| 369 |
added an option to truncate the message instead. |
| 370 |
Also, in case of session abort a descriptive error message is |
| 371 |
emitted. This did not happen previously and caused confusion. |
| 372 |
closes https://github.com/rsyslog/librelp/issues/81 |
| 373 |
* add new API: relpSrvSetLstnAddr() |
| 374 |
It permits to set the listen address inside the relp server. |
| 375 |
If not called, the server will bind to all interfaces. |
| 376 |
Thanks to github user perlei for contributing it. |
| 377 |
- support additional hashes for fingerprint mode |
| 378 |
old-style SHA1 is used automatically |
| 379 |
Thanks to github user briaeros for the patch. |
| 380 |
see also https://github.com/rsyslog/librelp/pull/55 |
| 381 |
- bugfix: potential memory leak |
| 382 |
This is very unlikely to occur in practice. Memory can be leaked |
| 383 |
when TLS initialization fails when the client tries to connect |
| 384 |
to the server. However, if this actually happens, it can happen |
| 385 |
frequently and so accumulate to a large leak. |
| 386 |
No report of such occurence from practice. |
| 387 |
Detected by Coverity Scan, CID 266008. |
| 388 |
- bugfix: memory leak on protocol error |
| 389 |
Receiving relp frames are not correctly deallocated while handling |
| 390 |
protocol errors resulting in memory leak of dirty pages. |
| 391 |
Thanks to github user gleentea for the patch. |
| 392 |
see also https://github.com/rsyslog/librelp/issues/59 |
| 393 |
closes https://github.com/rsyslog/librelp/issues/60 |
| 394 |
- fixed a couple of minor issues: |
| 395 |
* fix memory leak when relp frame construction fails |
| 396 |
detected by clang static analyzer |
| 397 |
* removed unnecessary code |
| 398 |
detected by clang static analyzer |
| 399 |
* fix memory leak |
| 400 |
This leaks occurs if the process is already totally out of memory, |
| 401 |
a situation that is very rare and will also cuase other troubles. |
| 402 |
So the practical relevance of this patch looks rather slim. |
| 403 |
Detected by clang static analyzer. |
| 404 |
* fix memory leak on relpSrvRun() error |
| 405 |
this is kind of cosmetic, because it can only occur when the |
| 406 |
run fails, which usually should lead to termination of the |
| 407 |
calling application |
| 408 |
deteced by Coverity Scan, CID 266016 |
| 409 |
* fix memory leak on relp listener construction error |
| 410 |
detected by Coverity Scan, CID 266014, 266015 |
| 411 |
* also resolved all other issues reported by Coverity scan |
| 412 |
- CI |
| 413 |
* added native testbench (formerly used rsyslog for testing) |
| 414 |
* added additional compile tests |
| 415 |
---------------------------------------------------------------------- |
| 416 |
Version 1.2.15 - 2018-03-21 |
| 417 |
- made build on Solaris again |
| 418 |
- made build on AIX |
| 419 |
Thanks to Philippe Duveau for providing the patches |
| 420 |
- bugfix: invalid handling of snprintf() return code |
| 421 |
- bugfix: invalid assert predicate |
| 422 |
an assert could change status variable due to typo, so in debug |
| 423 |
mode processing could fail. |
| 424 |
thanks to github user KatMisato for alerting us |
| 425 |
fixes https://github.com/rsyslog/librelp/issues/66 |
| 426 |
- some code cleanup |
| 427 |
- bugfix: error message on open error was truncated |
| 428 |
The "connection already open" error message when trying to open |
| 429 |
an already open connection was truncated due to too-small size |
| 430 |
specified. |
| 431 |
Thanks to rsyslog forum user AlanR for the problem report. |
| 432 |
---------------------------------------------------------------------- |
| 433 |
Version 1.2.14 - 2017-05-29 |
| 434 |
- API extension: add relpSrvSetMaxDataSize() |
| 435 |
Thanks to Nathan Brown for the patch. |
| 436 |
---------------------------------------------------------------------- |
| 437 |
Version 1.2.13 - 2017-02-20 |
| 438 |
- make build under BSD |
| 439 |
- bugfix: duplicated lines after server reconnect |
| 440 |
Thanks to Hervé for the patch. |
| 441 |
---------------------------------------------------------------------- |
| 442 |
Version 1.2.12 - 2016-07-07 |
| 443 |
- API enhancement: permit to set connection timeout |
| 444 |
Thanks to Nathan Brown for the patch. |
| 445 |
- cleanup: replace deprecated GnuTLS data types by current ones |
| 446 |
- CI improvements: added dynamic tests |
| 447 |
we now use the rsyslog testbench to do dynamic librelp tests. This |
| 448 |
currently happens only under Travis CI. |
| 449 |
---------------------------------------------------------------------- |
| 450 |
Version 1.2.11 - 2016-06-22 |
| 451 |
- bugfix: do not accept more than one "open" verb on a connection |
| 452 |
closes https://github.com/rsyslog/librelp/issues/37 |
| 453 |
- bugfix: potential segfault when high-numbered fd is used in sender |
| 454 |
When a fd (socket) with value >= 1024 was used by the client sender |
| 455 |
process, the library could segfault in select(). This depended a bit |
| 456 |
on the platform. |
| 457 |
This patch solves the issue by replacing the select() call with |
| 458 |
poll(). Note that we do not changed to epoll(), because |
| 459 |
(a) we only wait on a single fd |
| 460 |
(b) poll() is more portable |
| 461 |
closes https://github.com/rsyslog/librelp/issues/38 |
| 462 |
- bugfix: make librelp not run in thight loop when out of sockets |
| 463 |
If the process can no longer accept new connections (via accept) |
| 464 |
because it has reached its file handle maximum, librelp runs in |
| 465 |
a thight loop until either the client connection request is aborted |
| 466 |
or a file handle becomes available. |
| 467 |
This happens due to the fact that we get event notifications on |
| 468 |
connection requests. As we can't satisfy it, we librelp always |
| 469 |
retries. Unfortunately, there is no socket call to cancel a |
| 470 |
connection request, so we cannot push the client request out. |
| 471 |
An alternative solution would be to close and re-open the |
| 472 |
listening socket, but in that case it is uncertain if we ever can |
| 473 |
re-aquire a socket (an easy DoS). So the best thing we can |
| 474 |
probably do is delay retries a bit. We must be careful, however, |
| 475 |
not to use a too long delay, as that would also affect other |
| 476 |
connections. We could address that problem via a dedicated thread |
| 477 |
for the listening process, but librelp is designed so that it can |
| 478 |
be used by callers with any threading library and threading model, |
| 479 |
and that would violate this design principle. |
| 480 |
Judging the alternatives, a slight delay probably is the best |
| 481 |
solution, especially as the situation is uncommon and will hopefully |
| 482 |
not last too long. This patch implements that solution. |
| 483 |
closes https://github.com/rsyslog/librelp/issues/34 |
| 484 |
- bugfix: flush the current recv frame if it exists if the client |
| 485 |
session is restarting |
| 486 |
Thanks to Nate Brown for the patch. |
| 487 |
- API enhancement: add configurable connection timeout |
| 488 |
Thanks to Nate Brown for the patch. |
| 489 |
---------------------------------------------------------------------- |
| 490 |
Version 1.2.10 - 2016-03-30 |
| 491 |
- make compatible with older versions of GnuTLS which require |
| 492 |
libgcrypt |
| 493 |
- improve example sender/receiver code |
| 494 |
Thanks to Chris Pilkington for the patches. |
| 495 |
- bugfix: Send full buffers after connection re-establishing |
| 496 |
When sending large buffers it's possible that only part of buffer data |
| 497 |
will be transferred before connection is closed. Then on connection |
| 498 |
re-establishing librelp thinks part of buffer is already sent and |
| 499 |
transfers only remaining part. Remote side then is not be able to parse |
| 500 |
such message and always closes the connection. |
| 501 |
Thanks to github user cellscape for the patch. |
| 502 |
---------------------------------------------------------------------- |
| 503 |
Version 1.2.9 - 2015-12-15 |
| 504 |
- bugfix: Ignoring return status when handling syslog frames now. |
| 505 |
Otherwise valid messages in the frame buffer will get lost when the |
| 506 |
remote connection is closed during meantime. |
| 507 |
- build bugfix: GnuTLS header was required even if TLS was turned off |
| 508 |
Thanks to Pedro Alvarez Piedehierro for the patch. |
| 509 |
- bugfix: correct wrong assert() calls [debug mode only affected] |
| 510 |
---------------------------------------------------------------------- |
| 511 |
Version 1.2.8 - 2014-09-07 |
| 512 |
- bugfix: segfault if KEEPALIVE is used |
| 513 |
Thanks to Tomas Heinrich for the patch. |
| 514 |
---------------------------------------------------------------------- |
| 515 |
Version 1.2.7 - 2014-04-29 |
| 516 |
- bugfix: librelp was incompatible with C++ without a real reason |
| 517 |
Thanks to Ivan Kryak for the patch |
| 518 |
- bugfix: potential misadressing in wildcard match |
| 519 |
see: https://github.com/rsyslog/librelp/pull/3 |
| 520 |
Thanks to Sebastian Schmidt for the patch. |
| 521 |
- bugfix: always last wildcard match was reported, not first |
| 522 |
see: https://github.com/rsyslog/librelp/pull/4 |
| 523 |
Thanks to Sebastian Schmidt for the patch. |
| 524 |
---------------------------------------------------------------------- |
| 525 |
Version 1.2.6 - 2014-03-20 |
| 526 |
- report error when preparing for non-anon TLS and this is unsupported |
| 527 |
The error is reported when the processes own certificate is set, |
| 528 |
which also turns off anon TLS. We now check if TLS AUTH is supported |
| 529 |
and, if not, return an error. This enables better error tracking |
| 530 |
in the client, as otherwise the problem is reported much later |
| 531 |
or even not at all (in the case of a relp server). |
| 532 |
---------------------------------------------------------------------- |
| 533 |
Version 1.2.5 - 2014-03-20 |
| 534 |
- permit to use anonymous TLS on platforms where GnuTLS misses |
| 535 |
certificate verification function. This permits to use at least |
| 536 |
anon TLS on platforms like RHEL and CENTOS 6. |
| 537 |
---------------------------------------------------------------------- |
| 538 |
Version 1.2.4 - 2014-03-17 |
| 539 |
- correct API/ABI change in 1.2.3 |
| 540 |
My reasoning was flawed, and we could run into problems with |
| 541 |
apps that required the new version but could not detect that an |
| 542 |
older one was installed. |
| 543 |
Thanks to Michael Biebl for pointing this out. |
| 544 |
What we have done is: |
| 545 |
- revert back to previous state (return void) |
| 546 |
* relpSrvEnableTLS(); |
| 547 |
* relpSrvEnableTLSZip(); |
| 548 |
These functions are now deprecated. |
| 549 |
- introduce new functions that return a state |
| 550 |
* relpSrvEnableTLS2(); |
| 551 |
* relpSrvEnableTLSZip2(); |
| 552 |
---------------------------------------------------------------------- |
| 553 |
Version 1.2.3 - 2014-03-13 |
| 554 |
************************************************************ |
| 555 |
* NOTE: this version should NOT be used due to the API * |
| 556 |
* change specified below. * |
| 557 |
************************************************************ |
| 558 |
- add ability to build librelp without TLS |
| 559 |
This is required on some platforms where GnuTLS is too old |
| 560 |
Use --disable-tls to select this mode. If set, RELP_RET_ERR_NO_TLS |
| 561 |
will be returned on calls that selected TLS mode. |
| 562 |
See also: https://github.com/rsyslog/librelp/issues/1 |
| 563 |
- API change: two functions that used to return void now return state |
| 564 |
these are: |
| 565 |
* relpSrvEnableTLS(); |
| 566 |
* relpSrvEnableTLSZip(); |
| 567 |
This change is acceptable because the state must not necessary be |
| 568 |
evaluated. If not, the same error is returned a bit later in the |
| 569 |
calling sequence. Having it early, however, may help with better |
| 570 |
error messages. So it's still optional to check. |
| 571 |
- bugfix: configure required too-old version of GnuTLS |
| 572 |
This lead to successful builds which later on would not execute. |
| 573 |
---------------------------------------------------------------------- |
| 574 |
Version 1.2.2 - 2014-01-07 |
| 575 |
- add capability to enable tcp KEEPALIVE |
| 576 |
- introduced new API relpSrvSetKeepAlive() to support KEEPALIVE |
| 577 |
---------------------------------------------------------------------- |
| 578 |
Version 1.2.1 - 2013-09-26 |
| 579 |
- errors binding listener port are now reported via error message |
| 580 |
callback |
| 581 |
---------------------------------------------------------------------- |
| 582 |
Version 1.2.0 - 2013-07-15 |
| 583 |
- support for epoll() added |
| 584 |
platforms that do not support it fall back to select() |
| 585 |
- API extension: relpEngineSetOnGenericErr |
| 586 |
---------------------------------------------------------------------- |
| 587 |
Version 1.1.5 - 2013-07-05 |
| 588 |
- bugfix: memory leak on connection close |
| 589 |
around 60 bytes of memory were lost on each connection close at the |
| 590 |
server side (when the client initiated a close) |
| 591 |
- bugfix: potential misadressing on session close |
| 592 |
This can happen if also a write was outstanding, a quite unusable |
| 593 |
situation. In that case, already freed memory was being accessed. |
| 594 |
---------------------------------------------------------------------- |
| 595 |
Version 1.1.4 - 2013-07-03 |
| 596 |
- fix build problems on BSD |
| 597 |
Thanks to Christiano for analysis and patch suggestion. |
| 598 |
- add ability to specify a non-standard RELP Window size |
| 599 |
- add burst support to the client API |
| 600 |
With this, we remove the unconditional performance improvement |
| 601 |
done in 1.1.3 - it is better to call the APIs explicitely. |
| 602 |
- wildcards are now supported in TLS name peer authentication |
| 603 |
They follow RFC5425 recommandations, e.g. |
| 604 |
*.example.com, client*.example.com, client01.*.com |
| 605 |
- new APIs: relpCltHintBurstBegin, relpCltHintBurstEnd, |
| 606 |
relpCltSetWindowSize |
| 607 |
---------------------------------------------------------------------- |
| 608 |
Version 1.1.3 - 2013-06-26 |
| 609 |
- increased performance of RELP connection |
| 610 |
- bugfix: potential segfault if no GnuTLS priority string was set |
| 611 |
---------------------------------------------------------------------- |
| 612 |
Version 1.1.2 - 2013-06-24 |
| 613 |
- add capability to specify the GnuTLS priority string |
| 614 |
This gives callers complete control over crypto parameters, like |
| 615 |
ciphers to use. |
| 616 |
- add certificate-based authentication |
| 617 |
- add capability to specify number of Diffie-Hellman bits to use |
| 618 |
- API extension: relpSrvSetDHBits, relpSrvSetGnuTLSPriString, |
| 619 |
relpSrvSetGnuTLSPriString, relpCltSetGnuTLSPriString |
| 620 |
relpEngineSetOnAuthErr, relpCltSetUsrPtr, |
| 621 |
relpSrvSetAuthMode, relpCltSetAuthMode |
| 622 |
---------------------------------------------------------------------- |
| 623 |
Version 1.1.1 - 2013-06-11 |
| 624 |
- added compression support for TLS |
| 625 |
- API extension: relpCltEnableTLSZip, relpSrvEnableTLSZip |
| 626 |
---------------------------------------------------------------------- |
| 627 |
Version 1.1.0 - 2013-06-03 |
| 628 |
- add TLS support |
| 629 |
- new api for creating listners: |
| 630 |
... which permits us to set various properties before the listener |
| 631 |
is actually started. New callers should use it. Sequence is: |
| 632 |
* relpEngineListnerConstruct() |
| 633 |
* ... set properties ... (via relpSrv...() family) |
| 634 |
* relgEngineListnerConstructFinalize() |
| 635 |
This new style permits us to add/set additional listner options |
| 636 |
without the need to introduce ever-new listner create functions. |
| 637 |
Actually, their number would grow exponentionally, so this were |
| 638 |
a dead end. |
| 639 |
The old-style APIs relpEngineAddListner() and |
| 640 |
relpEngineAddListner2() are still fully supported (and supposed |
| 641 |
to be for a long time), but flagged as deprecated. |
| 642 |
---------------------------------------------------------------------- |
| 643 |
Version 1.0.7 - 2013-05-13 |
| 644 |
- ABI change: removed relpCltConnect2() API which was against |
| 645 |
librelp API philosophy |
| 646 |
This was only introduced in 1.0.6 and been in the code for a very |
| 647 |
short time. So we decided that the best thing to do is actually |
| 648 |
remove it (there is NO known released user, this changes was for |
| 649 |
yet unreleased rsyslog 7.5.0). |
| 650 |
---------------------------------------------------------------------- |
| 651 |
Version 1.0.6 - 2013-05-06 |
| 652 |
- enhanced API to permit binding a client to a specific IP address |
| 653 |
---------------------------------------------------------------------- |
| 654 |
Version 1.0.5 (rgerhards), 2013-04-24 |
| 655 |
- bugfix: compile problem on Solaris |
| 656 |
Thanks to John Lyman for the patch |
| 657 |
---------------------------------------------------------------------- |
| 658 |
Version 1.0.4 (rgerhards), 2013-04-11 |
| 659 |
- bugfix: busy loop on syslog sending as a client when server did not |
| 660 |
accept data; this was broken out only when the remote peer |
| 661 |
indicated that the connection as whole was broken. Now we properly |
| 662 |
timeout. |
| 663 |
---------------------------------------------------------------------- |
| 664 |
Version 1.0.3 (rgerhards), 2013-04-10 |
| 665 |
- added relpCltSetTimeout() interface function |
| 666 |
- improved timeout handling |
| 667 |
Note: default timeout is now consistently 90 seconds (there were |
| 668 |
some parts of the code where it were 10 seconds and at others |
| 669 |
they were 180). |
| 670 |
- provide support for user-settable shutdown indicator |
| 671 |
This was introduced in support of rsyslog, but is probably useful |
| 672 |
for other users as well. In short, it provides the ability to set |
| 673 |
a pointer that is expected to be zero as long as the library shall |
| 674 |
continue to run and set to 1 if it shall terminate. That ptr is then |
| 675 |
checked at appropriate places of the library code. |
| 676 |
---------------------------------------------------------------------- |
| 677 |
Version 1.0.2 (rgerhards), 2013-03-15 |
| 678 |
- added capability to support only IPv4/v6 instead of both |
| 679 |
---------------------------------------------------------------------- |
| 680 |
Version 1.0.1 (rgerhards), 2012-09-06 |
| 681 |
- added capability to stop server without canceling its thread |
| 682 |
- bugfix: interrupt of select() was not properly handled |
| 683 |
However, this caused no actual failure, just some unnecessary code |
| 684 |
execution (and confusing debug messages). |
| 685 |
---------------------------------------------------------------------- |
| 686 |
Version 1.0.0 (rgerhards), 2009-12-11 |
| 687 |
This version of librelp matured in practice and it is now time for |
| 688 |
a 1.0 release. Besides that, it includes a small number of |
| 689 |
changes: |
| 690 |
- bugfix: user callback never received remote IP address |
| 691 |
- bugfix: offers builder did use a fixed size string without bounds |
| 692 |
checking. I don't think this was a real issue as it was not |
| 693 |
exposed to the outside world, but now the buffer dynamically |
| 694 |
grows (which is the right thing to do). Thank to mterry for alerting |
| 695 |
me. |
| 696 |
---------------------------------------------------------------------- |
| 697 |
Version 0.1.3 (rgerhards), 2009-02-10 |
| 698 |
- the callback on message reception did not contain a way to pass on |
| 699 |
a caller cookie (e.g. for an instance pointer). An additional |
| 700 |
interface has been added to support that. |
| 701 |
- cleaned up FDL license specifics |
| 702 |
- added libtool versioning |
| 703 |
- made librelp compile out of the box on FreeBSD - thanks to Michael |
| 704 |
Biebl for the patch |
| 705 |
---------------------------------------------------------------------- |
| 706 |
Version 0.1.2 (rgerhards), 2008-04-09 |
| 707 |
- forward compatibility changes in support of our plans to use the |
| 708 |
rsyslog runtime in the future |
| 709 |
---------------------------------------------------------------------- |
| 710 |
Version 0.1.1 (rgerhards), 2008-04-09 |
| 711 |
- improved build system, thanks to Michael Biebl |
| 712 |
now easier to integrate with autoconf |
| 713 |
---------------------------------------------------------------------- |
| 714 |
Version 0.1.0 (rgerhards), 2008-04-01 |
| 715 |
- first version that is available to the public |
| 716 |
---------------------------------------------------------------------- |
| 717 |
Version 0.0.1 (rgerhards), 2008-03-13 |
| 718 |
- very experimental and incomplete version, not to be used any longer |