We don't need to check that a cache record is F_HOST in the

duplicate address code, since we're now searching a temporary hash
which holds only F_HOST records.
This commit is contained in:
Simon Kelley
2012-01-13 11:51:46 +00:00
parent 1ab62aec37
commit 805a11345c

View File

@@ -670,8 +670,7 @@ static void add_hosts_entry(struct crec *cache, struct all_addr *addr, int addrl
j = (j*2 +((unsigned char *)addr)[i]) % hashsz; j = (j*2 +((unsigned char *)addr)[i]) % hashsz;
for (lookup = rhash[j]; lookup; lookup = lookup->next) for (lookup = rhash[j]; lookup; lookup = lookup->next)
if ((lookup->flags & F_HOSTS) && if ((lookup->flags & flags & (F_IPV4 | F_IPV6)) &&
(lookup->flags & flags & (F_IPV4 | F_IPV6)) &&
memcmp(&lookup->addr.addr, addr, addrlen) == 0) memcmp(&lookup->addr.addr, addr, addrlen) == 0)
{ {
flags &= ~F_REVERSE; flags &= ~F_REVERSE;