mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Fix crash when empty address from DNS overlays A record from hosts.
This commit is contained in:
committed by
Simon Kelley
parent
90477fb794
commit
41a8d9e99b
@@ -481,7 +481,7 @@ struct crec *cache_insert(char *name, struct all_addr *addr,
|
||||
existing record is for an A or AAAA and
|
||||
the record we're trying to insert is the same,
|
||||
just drop the insert, but don't error the whole process. */
|
||||
if ((flags & (F_IPV4 | F_IPV6)) && (flags & F_FORWARD))
|
||||
if ((flags & (F_IPV4 | F_IPV6)) && (flags & F_FORWARD) && addr)
|
||||
{
|
||||
if ((flags & F_IPV4) && (new->flags & F_IPV4) &&
|
||||
new->addr.addr.addr.addr4.s_addr == addr->addr.addr4.s_addr)
|
||||
|
||||
Reference in New Issue
Block a user