summaryrefslogtreecommitdiffstats
path: root/plugins/imudp/imudp.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | bugfix in debug system and more instrumentation to find an issueRainer Gerhards2009-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | bugfix: debug string larger than 1K were improperly displayed. Max size is now 32K, and if a string is even longer it is meaningful truncated.
* | | | bugfix: compile problem when system provided only epoll_create()Rainer Gerhards2009-10-161-1/+1
| | | | | | | | | | | | | | | | I introduced that problem yesterday when I improved epoll support.
* | | | solved a recently introduced race during input thread shutdownRainer Gerhards2009-10-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was introduced when we re-enabled non-cancel thread termination a few commits ago. This code has never been released as a tarball, so that is no bugfix for a release but rather a WiP regression fix and thus does not need to be mentioned in the ChangeLog.
* | | | improved imudp so that epoll can be used in more environmentsRainer Gerhards2009-10-151-2/+9
| | | | | | | | | | | | | | | | Fixed potential compile time problem if EPOLL_CLOEXEC is not available.
* | | | added multi-ruleset support to imudpRainer Gerhards2009-10-131-28/+33
| | | | | | | | | | | | | | | | | | | | also bumped version number and corrected ChangeLog, where I merged some post 5.3.1 changes into the 5.3.1 section.
* | | | removed no longer needed msg_t property "bParseHOSTNAME"Rainer Gerhards2009-10-131-1/+0
| | | |
* | | | re-enabled input thread termination handling that does avoid thread cancellationRainer Gerhards2009-10-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...where possible. This provides a more reliable mode of rsyslogd termination (canceling threads my result in not properly freed resouces and potential later hangs, even though we perform proper cancel handling in our code). This is part of an effort to reduce thread cnacellation as much as possible in rsyslog. NOTE: some comments indicated that there were problems with some code that has been re-activated. Testing did not show any issues. My current assumption is that these issues were related to some other code that has been removed/changed during the previous restructuring events. In any case, if there is a shutdown issue, one should carefully look at this change here!
* | | | changed imuxsock to no longer use deprecated submitAndParseMsg() interfaceRainer Gerhards2009-10-121-1/+0
| | | |
* | | | Merge branch 'beta'Rainer Gerhards2009-10-091-0/+1
|\ \ \ \ | |/ / / |/| | |
| * | | bugfix and testbench improvementsRainer Gerhards2009-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - bugfix: solved potential (temporary) stall of messages when the queue was almost empty and few new data added (caused testbench to sometimes hang!) - fixed some race condition in testbench - added more elaborate diagnostics to parts of the testbench - solved a potential race inside the queue engine
| * | | Merge branch 'v4-beta' into betaRainer Gerhards2009-10-021-0/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html runtime/rsyslog.h tcpsrv.c
* | | | Merge branch 'v4-devel' into tmpRainer Gerhards2009-10-021-0/+3
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html runtime/rsyslog.h tcpsrv.c
| * | | Merge branch 'v4-stable' into v4-beta & BUGFIXRainer Gerhards2009-10-011-0/+3
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.ac doc/manual.html runtime/datetime.h runtime/parser.c runtime/rsyslog.h tools/syslogd.c v4-stable had a bug with RFC5424-formatted structured data, which showed was detected by the enhanced automatted testbench of v4-beta.
| | * | bugfix: zero-sized UDP messages are no longer processedRainer Gerhards2009-09-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, they were forwarded to processing, but this makes no sense Also, it looks like the system seems to provide a zero return code on a UDP recvfrom() from time to time for some internal reasons. These "receives" are now silently ignored.
* | | | removed some debugging commentsRainer Gerhards2009-09-141-4/+0
| | | |
* | | | changed imudp to utilize epoll(), where available.Rainer Gerhards2009-09-091-20/+101
| |_|/ |/| | | | | | | | | | | This shall provide slightly better performance (just slightly because we called select() rather infrequently on a busy system).
* | | Merge branch 'v4-devel' into betaRainer Gerhards2009-09-031-1/+1
|\| |
| * | Merge branch 'v4-stable' into v4-betaRainer Gerhards2009-09-031-1/+1
| |\| | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html
| | * bugfix: reverse lookup reduction logic in imudp do DNS queries too oftenRainer Gerhards2009-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A comparison was done between the current and the former source address. However, this was done on the full sockaddr_storage structure and not on the host address only. This has now been changed for IPv4 and IPv6. The end result of this bug could be a higher UDP message loss rate than necessary (note that UDP message loss can not totally be avoided due to the UDP spec)
* | | internal: added ability to terminate input modules not via pthread_cancel...Rainer Gerhards2009-07-201-0/+10
|/ / | | | | | | | | | | | | | | ... 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).
* | now put the new property-based methods to good useRainer Gerhards2009-07-011-3/+9
| | | | | | | | | | | | ... hopefully reducing the number of allocs/frees as well as overall memory usage in a busy system (plus that these shared properties hopefully remain in cache longer than its single-instance counterparts...)
* | RcvFromIP now also a propertyRainer Gerhards2009-07-011-1/+1
| | | | | | | | | | | | This sets stage to enable use of the property-interface to speed up things (mildly), the next step to be done. I have also fixed one regression of yesterday's changes.
* | introduced a new way of handling the RcvFrom propertyRainer Gerhards2009-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | ... plus a fix for a long-time bug in obj-types.h. That lead to the object pointer only then to become NULL when the object was actually destructed, I discovered this issue during introduction of the pRcvFrom property in msg_t, but it potentially had other effects, too. I am not sure if some experienced instability resulted from this bug OR if its fix will cause harm to so-far "correctly" running code. The later may very well be. Thus I will change it only for the current branch and also the beta, but not in all old builds. Let's see how things evolve.
* | finished transition to using inputName propertyRainer Gerhards2009-06-301-2/+0
| | | | | | | | | | ... plus some celanup and adding minor missing functionality (the rule debug info again tell the property name, not just number).
* | introduced the idea of detached propertiesRainer Gerhards2009-06-291-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | cleaned up/optimized raw message handling in msg objectRainer Gerhards2009-06-181-4/+1
| |
* | Merge branch 'master' into omfileRainer Gerhards2009-06-161-2/+2
|\| | | | | | | | | | | | | | | | | Conflicts: ChangeLog runtime/msg.h tcps_sess.c tcpsrv.c tools/syslogd.c
| * some performance optimizationsRainer Gerhards2009-06-161-2/+2
| | | | | | | | | | | | - saved gettimeofday() calls in imtcp (and increased reception buffer) - somewhat optimized stringbuf.c - some other optimizations
* | performance-enhanced imtcpRainer Gerhards2009-06-121-1/+30
|/ | | | | ...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.
* Merge branch 'beta' into masterRainer Gerhards2009-05-281-1/+1
|\ | | | | | | | | Conflicts: tests/Makefile.am
| * Merge branch 'v3-stable' into betaRainer Gerhards2009-05-281-1/+1
| |\ | | | | | | | | | | | | Conflicts: tests/Makefile.am
| | * bugfix: potential segfault issue when multiple $UDPServerRun directives are ↵Rainer Gerhards2009-05-121-1/+1
| | | | | | | | | | | | | | | | | | specified. Thanks to Michael Biebl for helping to debug this one.
* | | added capability to run multiple tcp listeners (on different ports)Rainer Gerhards2009-05-221-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | 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.
* | bugfix: parser did not correctly parse fields in UDP-received messagesRainer Gerhards2009-03-101-1/+1
| |
* | added $PreserveFQDN config file directiveRainer Gerhards2008-12-081-0/+1
| | | | | | | | Enables to use FQDNs in sender names where the legacy default
* | bugfix: imudp went into an endless loop under some circumstancesRainer Gerhards2008-12-081-3/+3
| | | | | | | | | | (but could also leave it under some other circumstances...) Thanks to David Lang and speedfox for reporting this issue.
* | Merge branch 'beta'Rainer Gerhards2008-12-051-4/+14
|\| | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html plugins/imudp/imudp.c
| * Merge branch 'v3-stable' into betav3.21.9Rainer Gerhards2008-12-041-2/+13
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html plugins/imudp/imudp.c
| | * security fix: imudp emitted a message when a non-permitted sender...v3.20.2Rainer Gerhards2008-12-041-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...tried to send a message to it. This behaviour is operator-configurable. If enabled, a message was emitted each time. That way an attacker could effectively fill the disk via this facility. The message is now emitted only once in a minute (this currently is a hard-coded limit, if someone comes up with a good reason to make it configurable, we will probably do that).
* | | Merge branch 'beta'Rainer Gerhards2008-12-041-5/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html doc/rsyslog_conf.html plugins/imudp/imudp.c runtime/rsyslog.h
| * | Merge branch 'v3-stable' into betaRainer Gerhards2008-11-291-5/+2
| |\| | | | | | | | | | | | | Conflicts: runtime/rsyslog.h
| | * security bugfix: $AllowedSender was not honored,Rainer Gerhards2008-11-291-5/+2
| | | | | | | | | | | | ...all senders were permitted instead
* | | moved bParseHostname and bIsParsed to msgFlagsRainer Gerhards2008-10-091-3/+1
| | | | | | | | | | | | | | | | | | This enables us to use more efficient calling conventions and also helps us keep the on-disk structure of a msg object more consistent in future releases.
* | | restoring msg parsing for imudpRainer Gerhards2008-10-091-0/+1
| | | | | | | | | | | | | | | | | | I tried to work too quick this morning. A side-effect of an earlier change was that no UDP messages were parsed, which lead to their loss, because no PRI was set in this case.
* | | reordered imudp processing.Rainer Gerhards2008-10-081-6/+21
| | | | | | | | | | | | | | | | | | Message parsing is now done as part of main message queue worker processing (was part of the input thread) This should also improve performance, as potentially more work is done in parallel.
* | | restructured imudp receive loopRainer Gerhards2008-10-081-60/+85
| | | | | | | | | | | | | | | | | | | | | | | | cleaned up previous code and redid it in a way that makes it much easier to extend it also added a new macro DBGPRINTF which is a performance-optimzed version of dbgprintf
* | | "output" timestamp now taken from mesg's time generatedRainer Gerhards2008-10-071-2/+4
| | | | | | | | | | | | | | | | | | | | | This enhances performance and, as some have pointed out, is probably also more consistent with what users expect how the various output-timestamp related function should work. This commit needs some more testing.
* | | simple (yet efficient) name caching added to imudpRainer Gerhards2008-10-071-2/+18
| | |
* | | added $UDPServerTimeRequery optionRainer Gerhards2008-10-061-3/+17
| | | | | | | | | | | | | | | | | | | | | ...which enables to work with less acurate timestamps in favor of performance. This enables querying of the time only every n-th time if imudp is running in the tight receive loop (aka receiving messsages at a high rate)
* | | performance-optimized imudpRainer Gerhards2008-10-021-32/+44
| | |