summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-09-29 14:37:33 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-09-29 14:37:33 +0200
commitf45217e776c937b677653c287d63b54ac8281bba (patch)
treefd1a7355a7d29a181cec5b31740b42f3cfcf3a1a /plugins
parent536415cf3dba053b0d2294b7f1dc8e34328e795f (diff)
downloadrsyslog-f45217e776c937b677653c287d63b54ac8281bba.tar.gz
rsyslog-f45217e776c937b677653c287d63b54ac8281bba.tar.xz
rsyslog-f45217e776c937b677653c287d63b54ac8281bba.zip
bugfix: zero-sized UDP messages are no longer processed
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imudp/imudp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 658ceb23..6f4a6384 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -178,6 +178,9 @@ processSocket(int fd, struct sockaddr_storage *frominetPrev, int *pbIsPermitted,
ABORT_FINALIZE(RS_RET_ERR);
}
+ if(lenRcvBuf == 0)
+ continue; /* this looks a bit strange, but practice shows it happens... */
+
/* if we reach this point, we had a good receive and can process the packet received */
/* check if we have a different sender than before, if so, we need to query some new values */
if(net.CmpHost(&frominet, frominetPrev, socklen) != 0) {