mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Don't silently discard all-zeroes adddresses in --host-record.
This commit is contained in:
@@ -1290,7 +1290,7 @@ void cache_reload(void)
|
||||
for (hr = daemon->host_records; hr; hr = hr->next)
|
||||
for (nl = hr->names; nl; nl = nl->next)
|
||||
{
|
||||
if (hr->addr.s_addr != 0 &&
|
||||
if ((hr->flags & HR_4) &&
|
||||
(cache = whine_malloc(SIZEOF_POINTER_CREC)))
|
||||
{
|
||||
cache->name.namep = nl->name;
|
||||
@@ -1299,7 +1299,7 @@ void cache_reload(void)
|
||||
add_hosts_entry(cache, (union all_addr *)&hr->addr, INADDRSZ, SRC_CONFIG, (struct crec **)daemon->packet, revhashsz);
|
||||
}
|
||||
|
||||
if (!IN6_IS_ADDR_UNSPECIFIED(&hr->addr6) &&
|
||||
if ((hr->flags & HR_6) &&
|
||||
(cache = whine_malloc(SIZEOF_POINTER_CREC)))
|
||||
{
|
||||
cache->name.namep = nl->name;
|
||||
|
||||
Reference in New Issue
Block a user