summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-09-03 15:48:57 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-09-03 15:48:57 +0200
commit1e9febaf28ffa1a6107cd0f5f2c0ac0ab2b16830 (patch)
tree8e9b0e5dd1276f2e85f91c1671b0d67d4615550f /plugins
parentfb8ce409fe609f8e195062f07206e264b5eeb396 (diff)
downloadrsyslog-1e9febaf28ffa1a6107cd0f5f2c0ac0ab2b16830.tar.gz
rsyslog-1e9febaf28ffa1a6107cd0f5f2c0ac0ab2b16830.tar.xz
rsyslog-1e9febaf28ffa1a6107cd0f5f2c0ac0ab2b16830.zip
bugfix: reverse lookup reduction logic in imudp do DNS queries too often
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)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imudp/imudp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 57aec9b6..658ceb23 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -180,7 +180,7 @@ processSocket(int fd, struct sockaddr_storage *frominetPrev, int *pbIsPermitted,
/* 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(memcmp(&frominet, frominetPrev, socklen) != 0) {
+ if(net.CmpHost(&frominet, frominetPrev, socklen) != 0) {
CHKiRet(net.cvthname(&frominet, fromHost, fromHostFQDN, fromHostIP));
memcpy(frominetPrev, &frominet, socklen); /* update cache indicator */
/* Here we check if a host is permitted to send us