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) --- runtime/net.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/net.h') diff --git a/runtime/net.h b/runtime/net.h index 092c3116..ec364b1c 100644 --- a/runtime/net.h +++ b/runtime/net.h @@ -146,11 +146,13 @@ BEGINinterface(net) /* name must also be changed in ENDinterface macro! */ rsRetVal (*AddPermittedPeer)(permittedPeers_t **ppRootPeer, uchar *pszID); rsRetVal (*DestructPermittedPeers)(permittedPeers_t **ppRootPeer); rsRetVal (*PermittedPeerWildcardMatch)(permittedPeers_t *pPeer, uchar *pszNameToMatch, int *pbIsMatching); + /* v5 interface additions */ + int (*CmpHost)(struct sockaddr_storage *, struct sockaddr_storage*, size_t); /* data members - these should go away over time... TODO */ int *pACLAddHostnameOnFail; /* add hostname to acl when DNS resolving has failed */ int *pACLDontResolve; /* add hostname to acl instead of resolving it to IP(s) */ ENDinterface(net) -#define netCURR_IF_VERSION 4 /* increment whenever you change the interface structure! */ +#define netCURR_IF_VERSION 5 /* increment whenever you change the interface structure! */ /* prototypes */ PROTOTYPEObj(net); -- cgit v1.2.3