116 Commits

Author SHA1 Message Date
Rainer Gerhards
c4b0f6bcae Merge branch 'v4-devel' into master
Conflicts:
	runtime/rsyslog.h
	runtime/wtp.c
2010-04-23 11:43:00 +01:00
Rainer Gerhards
3a12d05433 solved alignment errors on Solaris Sparc 2010-04-22 14:38:12 +01:00
Rainer Gerhards
8f0a8076cc Merge branch 'beta' into master
Conflicts:
	ChangeLog
	configure.ac
	plugins/imudp/imudp.c
	runtime/stream.h
	tests/Makefile.am
	tests/diag.sh
	tools/omfile.c
2010-04-09 13:00:56 +02:00
Rainer Gerhards
87a957b0f5 Merge branch 'v4-stable-solaris' into beta
Conflicts:
	runtime/Makefile.am
	runtime/rsyslog.c
	tests/nettester.c
	tools/syslogd.c
2010-04-09 12:27:59 +02:00
Rainer Gerhards
2cd132eebb enhanced nettester tool so that it re-uses it's callers environment
this enables us to work with the "usual" environment tweaks (for
debugging and other purposes), without the need for any special
handling in nettester itself
2010-04-07 12:42:41 +02:00
Rainer Gerhards
8b9cef552d Merge branch 'v4-stable' into v5-stable
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	runtime/debug.c
	runtime/stream.c
	tests/Makefile.am
	tests/diskqueue.sh
	tests/nettester.c
	tools/omfile.c
2010-03-29 11:07:15 +02:00
Rainer Gerhards
a3e48b697f bugfix(temporary): message-induced off-by-one error (potential segfault)
Some types of malformed messages could trigger an off-by-one error
(for example, \0 or \n as the last character, and generally control
character escaption is questionable). This is due to not strictly
following a the \0 or string counted string paradigm (during the last
optimization on the cstring class). As a temporary fix, we have
introduced a proper recalculation of the size. However, a final
patch is expected in the future. See bug tracker for further details
and when the final patch will be available:
http://bugzilla.adiscon.com/show_bug.cgi?id=184
Note that the current patch is considered sufficient to solve the
situation, but it requires a bit more runtime than desirable.
2010-03-25 08:03:37 +01:00
Rainer Gerhards
de7726cbf0 Merge branch 'v4-stable' into v5-stable
Conflicts:
	ChangeLog
	runtime/datetime.h
2010-03-09 09:15:14 +01:00
Rainer Gerhards
d97ad63e21 added new property replacer option "date-rfc3164-buggyday"
primarily to ease migration from syslog-ng. See property replacer doc for
details. [backport from 5.5.3 because urgently needed by some]
2010-03-08 17:56:11 +01:00
Rainer Gerhards
b3c8528b50 added new property replacer option "date-rfc3164-buggyday"
primarily to ease migration from syslog-ng. See property replacer doc
for details.
2010-03-05 07:56:57 +01:00
Rainer Gerhards
c577e9c64c bugfix: message without MSG part could case a segfault
[backported from v5 commit 98d1ed504ec001728955a5bcd7916f64cd85f39f]
This actually was a "recent" regression, but I did not realize that it
was introduced by the performance optimization in v4-devel. Shame on
me for having two devel versions at the same time...
2010-02-22 09:31:10 +01:00
Rainer Gerhards
200e2b6630 Merge branch 'beta' into master
Conflicts:
	ChangeLog
	tests/parsertest.sh
2010-02-10 17:41:28 +01:00
Rainer Gerhards
c8ebe62337 Merge branch 'v4-beta' into beta
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	plugins/imuxsock/imuxsock.c
	template.c
	tests/Makefile.am
	tests/parsertest.sh
2010-02-10 16:35:12 +01:00
Rainer Gerhards
e1584b71f3 several bugfixes for the property replacer
- bugfix: property replacer returned invalid parameters under some (unusual)
  conditions. In extreme cases, this could lead to garbled logs and/or
  a system failure.
- bugfix: invalid length returned (often) when using regular expressions
  inside the property replacer
- bugfix: submatch regex in property replacer did not honor "return 0 on
  no match" config case
2010-02-08 16:53:30 +01:00
Rainer Gerhards
38cb392672 replaced data type "bool" by "sbool" because this created some portability issues 2010-02-02 15:51:01 +01:00
Rainer Gerhards
8c20add150 Merge branch 'beta'
Conflicts:
	ChangeLog
2009-11-30 12:46:57 +01:00
Rainer Gerhards
3fd95bfb5d Merge branch 'v4-beta' into beta 2009-11-30 12:45:37 +01:00
Rainer Gerhards
09a10603ff bugfix: hostname accidently set to IP address for some message sources
for example imudp. Thanks to Anton for reporting this bug.
2009-11-30 12:43:03 +01:00
Rainer Gerhards
8c29f28435 moved DNS resolution code out of imudp and into the backend processing
Most importantly, DNS resolution now never happens if the resolved name
is not required. Note that this applies to imudp - for the other inputs,
DNS resolution almost comes for free, so we do not do it there. However,
the new method has been implemented in a generic way and as such may
also be used by other modules in the future.
2009-11-17 08:11:31 +01:00
Rainer Gerhards
6be07a8f8a bugfix: potential abort if inputname property was not set
primarily a problem of imdiag. Also added some fix for a potential
situation during cancel processing. That one is not considered vital
and may later be removed again.
2009-10-26 10:09:04 +01:00
Rainer Gerhards
e04e1b5002 enhanced test environment (including testbench)
support for enhancing probability of memory addressing failure by
using non-NULL default value for malloced memory (optional, only if
requested by configure option). This helps to track down some
otherwise undetected issues within the testbench and is expected
to be very useful in the future.
2009-10-22 11:33:38 +02:00
Rainer Gerhards
05b0c4322b removed no longer needed msg_t property "bParseHOSTNAME" 2009-10-13 07:29:11 +02:00
Rainer Gerhards
98d1ed504e bugfix: potential segfault on messages with empty MSG part.
This was a recently introduced regression.
2009-10-09 15:37:34 +02:00
Rainer Gerhards
b81c4252e8 Merge branch 'v4-beta' into beta 2009-09-14 15:40:06 +02:00
Rainer Gerhards
92b4f6d610 fixed some minor portability issues 2009-09-14 15:39:16 +02:00
Rainer Gerhards
de10acc9db Merge branch 'v4-beta' into beta
Conflicts:
	action.c
2009-09-10 15:37:22 +02:00
Rainer Gerhards
78e9c7c4d2 bugfix: repeated messages were incorrectly processed
this could lead to loss of the repeated message content. As a side-
effect, it could probably also be possible that some segfault occurs
(quite unlikely). The root cause was that some counters introduced
during the malloc optimizations were not properly duplicated in
MsgDup(). Note that repeated message processing is not enabled
by default.
2009-09-10 15:04:08 +02:00
Rainer Gerhards
809f0a16e7 Merge branch 'master' into udpspoof & cleanup & slight optimization
Conflicts:
	runtime/msg.c

I messed up and did some changes during the merge commit ;) But these are
not large, just a little bit of cleanup and some very slight optimizations
inside the msg object.
2009-07-09 17:45:21 +02:00
Rainer Gerhards
6fde78cb74 small performance improvement and cleanup
optimized substring processing, should bring a small enhancement when
forwarding with the default forwarding templates. Also did some uchar
cleanup in msg.c (thus so many changes, in reality they are few...).
2009-07-09 17:19:21 +02:00
Rainer Gerhards
9de685929e bugfix: message could be truncated after TAG, often when forwarding
This was a result of an internal processing error if maximum field
sizes had been specified in the property replacer.
Also did some testbench improvements, including omstdout.
2009-07-09 16:32:14 +02:00
Rainer Gerhards
cafb951020 bugfix: message could be truncated after TAG, often when forwarding
This was a result of an internal processing error if maximum field
sizes had been specified in the property replacer.
2009-07-09 12:25:51 +02:00
Rainer Gerhards
9e9322585d bugfix: property msg was lost when working with disk queues 2009-07-07 13:12:15 +02:00
Rainer Gerhards
27deea809d bugfix: properties inputname, fromhost, fromhost-ip were lost
... when working with disk queues.
2009-07-07 12:26:23 +02:00
Rainer Gerhards
7fdeac0bdc bugfix: abort condition when RecvFrom was not set and message reduction was on
Happend e.g. with imuxsock.
2009-07-06 13:30:45 +02:00
Rainer Gerhards
7bfa03bdc0 now put the new property-based methods to good use
... 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...)
2009-07-01 14:33:19 +02:00
Rainer Gerhards
d6faee67b4 RcvFromIP now also a property
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.
2009-07-01 13:28:17 +02:00
Rainer Gerhards
aaffc4281e introduced a new way of handling the RcvFrom property
... 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.
2009-06-30 18:45:41 +02:00
Rainer Gerhards
e397c34d2a finished transition to using inputName property
... plus some celanup and adding minor missing functionality
(the rule debug info again tell the property name, not just number).
2009-06-30 15:21:15 +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
7ea63db2f9 optimization: propert names are now internally identified by integers 2009-06-26 15:31:40 +02:00
Rainer Gerhards
d88803c8e4 got rid of the recursive requirement for msg_t mutex (finally!) 2009-06-26 13:42:52 +02:00
Rainer Gerhards
464dcf2339 some more stringbuffer optimization 2009-06-25 18:44:48 +02:00
Rainer Gerhards
12dc91a157 backported "clean" increment of memory trim counter (not protected by mutex) 2009-06-25 17:09:51 +02:00
Rainer Gerhards
46435e2c3b cleanup (removed now-unused parameters) 2009-06-25 15:33:49 +02:00
Rainer Gerhards
db3d5edbe6 Merge branch 'beta' 2009-06-24 15:17:04 +02:00
Rainer Gerhards
301ac7591a Merge branch 'v4-stable' into beta 2009-06-24 15:16:51 +02:00
Rainer Gerhards
736a3631e6 Merge branch 'v3-stable' into v4-stable 2009-06-24 15:16:35 +02:00
Rainer Gerhards
af2dfd1c51 bugfix: invalid mutex release in msg.c
Detected under threading debugger, seems not to have any impact on
actual deployments.
2009-06-24 15:15:49 +02:00
Rainer Gerhards
b2fa740b9a optimized TAG handling 2009-06-23 17:14:42 +02:00
Rainer Gerhards
662ad3e4bf optimized hostname processing 2009-06-23 16:32:29 +02:00