From 1e9febaf28ffa1a6107cd0f5f2c0ac0ab2b16830 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 3 Sep 2009 15:48:57 +0200 Subject: 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) --- plugins/imudp/imudp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/imudp') 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 -- cgit