mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Remove nested struct/union in cache records and all_addr.
This commit is contained in:
@@ -62,7 +62,7 @@ void ipset_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
int add_to_ipset(const char *setname, const struct all_addr *ipaddr,
|
||||
int add_to_ipset(const char *setname, const union all_addr *ipaddr,
|
||||
int flags, int remove)
|
||||
{
|
||||
struct pfr_addr addr;
|
||||
@@ -113,13 +113,13 @@ int add_to_ipset(const char *setname, const struct all_addr *ipaddr,
|
||||
{
|
||||
addr.pfra_af = AF_INET6;
|
||||
addr.pfra_net = 0x80;
|
||||
memcpy(&(addr.pfra_ip6addr), &(ipaddr->addr), sizeof(struct in6_addr));
|
||||
memcpy(&(addr.pfra_ip6addr), ipaddr, sizeof(struct in6_addr));
|
||||
}
|
||||
else
|
||||
{
|
||||
addr.pfra_af = AF_INET;
|
||||
addr.pfra_net = 0x20;
|
||||
addr.pfra_ip4addr.s_addr = ipaddr->addr.addr4.s_addr;
|
||||
addr.pfra_ip4addr.s_addr = ipaddr->addr4.s_addr;
|
||||
}
|
||||
|
||||
bzero(&io, sizeof(io));
|
||||
|
||||
Reference in New Issue
Block a user