71 Commits

Author SHA1 Message Date
Rainer Gerhards
d9f1a16de4 improved input thread termination for imtcp and imuxsock 2009-10-16 09:33:21 +02:00
Rainer Gerhards
189c0284c1 Merge branch 'v4-devel' into tmp
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	runtime/rsyslog.h
	tcpsrv.c
2009-10-02 12:25:22 +02:00
Rainer Gerhards
724ba2b27f bumped version number, corrected error message code (minor nit) 2009-10-01 18:47:16 +02:00
Rainer Gerhards
6a69e47822 added $InputTCPServerNotifyOnConnectionClose config directive 2009-10-01 18:39:21 +02:00
Rainer Gerhards
74042e9602 Merge branch 'beta' 2009-08-18 11:03:32 +02:00
Rainer Gerhards
56b781e5bb added $InputTCPMaxListeners directive
permits to specify how many TCP servers shall be possible (default is 20).
2009-08-17 17:18:19 +02:00
Rainer Gerhards
9cab1036d2 bugfix: if tcp listen port could not be created, no error message was emitted 2009-08-17 16:23:37 +02:00
Rainer Gerhards
7d92de155c internal: added ability to terminate input modules not via pthread_cancel...
... but an alternate approach via pthread_kill. This is somewhat safer as we
do not need to think about the cancel-safeness of all libraries we use.
However, not all inputs can easily supported, so this now is a feature
that can be requested by the input module (the most important ones
request it).
2009-07-20 18:36:30 +02:00
Rainer Gerhards
093179e9d3 minor: dbgprintf() converted to DBGPRINTF() 2009-07-20 16:47:26 +02:00
Rainer Gerhards
1359632eef re-structured tcpsrv.c a bit, no real change
... but this sets stage for potential future optimizations, especially
the capability to use multiple reception threads.
2009-07-20 16:45:39 +02:00
Rainer Gerhards
de84a12f8a introduced the idea of detached properties
some things inside the message can be used over a large number of
messages and need to to be allocated and re-written every time. I now
begin to implement this as a "prop_t" object, first use for the inputName.
Some input modules are already converted, some others to go. Will do
a little performance check on the new method before I go further.

Also, this commit has some cleanup and a few bug fixes that prevented
compiliation in debug mode (I overlooked this as I did not compile
for debug, what I normally do, and the automatted test also does not
do that)
2009-06-29 16:53:26 +02:00
Rainer Gerhards
98348ae03d Merge branch 'master' into omfile
Conflicts:
	ChangeLog
	runtime/msg.h
	tcps_sess.c
	tcpsrv.c
	tools/syslogd.c
2009-06-16 12:59:55 +02:00
Rainer Gerhards
015d17ca70 some performance optimizations
- saved gettimeofday() calls in imtcp (and increased reception buffer)
- somewhat optimized stringbuf.c
- some other optimizations
2009-06-16 08:46:45 +02:00
Rainer Gerhards
057c9b11fc fixed a regression from past commit & more performance enhancement
a larger buffer is a cheap, yet useful, enhancement... ;)
2009-06-12 16:30:39 +02:00
Rainer Gerhards
b5ccdf0672 performance-enhanced imtcp
...by now using lowres time and thus saving many time() calls. This needs
some performance testing and must be made configurable if it works out.
2009-06-12 15:59:50 +02:00
Rainer Gerhards
ca0ddc30a3 completed multi-ruleset core support
... as well as added multi-ruleset support for imtcp
2009-06-12 15:31:08 +02:00
Rainer Gerhards
14d1209640 added a generic network stream server
(in addition to rather specific syslog tcp server)
2009-06-02 10:31:42 +02:00
Rainer Gerhards
a900a7c34b greatly enhanced testbench
The imdiag module now can very effectively inject messages, which also
frees us from uncertainties of tcp reception and processing. All shell
script based tests have been modularized, what makes it far easier to
create new tests. Also, the test bench now executes more reliable and
much faster, because we can now rely on actual engine information where
we previously did just a dumb sleep.
2009-05-27 11:29:47 +02:00
Rainer Gerhards
eb1615068c added new testing module imdiag
which enables to talk to the rsyslog core at runtime. The current
implementation is only a beginning, but can be expanded over time
2009-05-25 10:47:22 +02:00
Rainer Gerhards
aba90e8248 added capability to run multiple tcp listeners (on different ports)
Well, actually this and a lot of related things. I improved the
testbench so that the new capabilities are automatically tested and
also did some general cleanup. The current multiple tcp listener
solution will probably receive some further cleanup, too, but looks
quite OK so far. I also reviewed the way tcpsrv et all work, in
preparation of using this code for imdiag. I need to document the
findings, especially as the code is rather complicated "thanks" to
the combination of plain tcp and gssapi transport modes.
2009-05-22 17:06:52 +02:00
Rainer Gerhards
2aca3c2d33 made imdiag *just* compile & some cleanup
imdiag was never finished (not even really begun), but now I need it.
I made the few things that are available compile, but more serious
work is required.
2009-05-20 17:35:21 +02:00
Rainer Gerhards
a5b4cb1681 Merge branch 'beta'
Conflicts:
	ChangeLog
	tcpsrv.c
	tcpsrv.h

Note: we have a slight inconsistency, as interface version v4 was already
used for tcpsrv in this branch. We accept this inconsistency.
2009-04-09 13:44:52 +02:00
Rainer Gerhards
0cade5118f Merge branch 'v3-stable' into beta
Conflicts:
	ChangeLog
2009-04-09 13:41:38 +02:00
Rainer Gerhards
bc471f1d90 bugfix: $InputTCPMaxSessions config directive was accepted, but not honored
This resulted in a fixed upper limit of 200 connections.
2009-04-09 13:36:44 +02:00
Rainer Gerhards
2dd15ac573 Merge branch 'v3-stable' into beta
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
2008-12-04 12:11:58 +01:00
Rainer Gerhards
b41bdeff56 bugfix: memory leak if sender was not permitted 2008-12-03 11:28:41 +01:00
Rainer Gerhards
97b89435aa bugfix: $AllowedSender handled invalidly for plain TCP transport 2008-11-29 09:47:04 +01:00
Rainer Gerhards
1a9ac0ced7 removed compile time fixed message size limit (was 2K)
The limit can now be set via $MaxMessageSize global config
directive (finally gotten rid of MAXLINE ;))
2008-09-02 11:38:31 +02:00
Rainer Gerhards
b7c91420b0 begun implementing a diagnostic plugin (not yet completed) 2008-07-28 07:46:35 +02:00
Rainer Gerhards
3f6c73a8b7 added (internal) error codes to error messages
Also added redirector to web description of error codes
closes bug http://bugzilla.adiscon.com/show_bug.cgi?id=20
2008-06-27 12:52:45 +02:00
Rainer Gerhards
dd3e2cae9d improved gtls error reporting 2008-06-24 17:44:16 +02:00
Rainer Gerhards
b5d8f5d96a added support for EGAIN while trying to receive data on gTLS session
This maps to bugzilla bug 83: http://bugzilla.adiscon.com/show_bug.cgi?id=83
This is the first test version, posted to user for repro of the problem.

It contains code to handle the case, HOWEVER, I have not been able to test it
in a scenario where a retry actually happens while receiving (I dont't get this
in my environment). So I assume it is buggy and will probably not work.
2008-06-24 15:12:22 +02:00
Rainer Gerhards
b711a34a07 disabled compile warnings caused by third-party libraries 2008-06-23 11:29:47 +02:00
Rainer Gerhards
7b1a570d54 changed Rcv-Interface in tcpsrv subsystem
It is now iRet based. This enables us to communicate
more in-depth information to the upper peers. This is needed
to handle the EGAIN case on rcv (not yet implemented)
2008-06-23 10:29:15 +02:00
Rainer Gerhards
cb8188da16 re-enabled anon mode (failed if client did not provide cert) 2008-05-21 11:04:01 +02:00
Rainer Gerhards
85b587f93d first implementation of TLS server client authentication check
The TLS server now checks the client fingerprint. This works, but
is highly experimental. Needs to be refined for practice. Also:
- implemented permittedPeers helper construct to store names
- changed omfwd implementation to use new permittedPeers
2008-05-19 18:52:44 +02:00
Rainer Gerhards
09afe64f29 added fromhost-ip properties and some bugfixes
- bugfix: TCP input modules did incorrectly set fromhost property
  (always blank)
- bugfix: imklog did not set fromhost property
- added "fromhost-ip" property
- added "RSYSLOG_DebugFormat" canned template
- bugfix: hostname and fromhost were swapped when a persisted message
  (in queued mode) was read in
2008-05-16 13:36:41 +02:00
Rainer Gerhards
da88900143 added $InputTCPServerStreamDriverMode config directive 2008-04-30 18:53:21 +02:00
Rainer Gerhards
b0d63ea8f2 made plain tcp syslog via TLS work on the server
... but so far only in blocking mode
2008-04-30 14:51:45 +02:00
Rainer Gerhards
055d4ffc2a fixed problem with module unload sequence 2008-04-29 15:36:22 +02:00
Rainer Gerhards
76e4eb29d4 fixed memory leaks 2008-04-28 08:09:21 +02:00
Rainer Gerhards
75cf92117c made gtls server driver work in plain tcp mode 2008-04-25 12:54:59 +02:00
Rainer Gerhards
0e19d501bb fixed newly introduced memory leaks 2008-04-24 10:54:51 +02:00
Rainer Gerhards
bf3d2c1b39 message reception via TCP work again
... at least in some cases ;) I assume there are still a couple
of bugs inside the code. But at least we have something from
where we can continue to work on.
2008-04-24 09:57:43 +02:00
Rainer Gerhards
50fe2ec2ea removed listener array from inidividual netstrm (mostly finished) 2008-04-23 16:31:35 +02:00
Rainer Gerhards
1892fc75f9 added new netstrms class
netstrms is at the top layer of the socket abstraction
2008-04-23 15:07:19 +02:00
Rainer Gerhards
2be459c4d7 objects for receive-side socket abstraction specified
The objects for receiver-side socket abstraction have now be
specified. The project as whole does not yet compile and
definitely not run, but I'd like to commit some milestones along
this way.
2008-04-23 09:59:01 +02:00
Rainer Gerhards
92303d400b added new "netstrm" class (not yet implemented) 2008-04-17 14:33:43 +02:00
Rainer Gerhards
911101ed26 moved "option_DisallowWarning" variable to global data pool 2008-04-17 09:54:10 +02:00
Rainer Gerhards
8c65706d22 moved "family" variable to global data pool 2008-04-17 09:25:03 +02:00