Remove nested struct/union in cache records and all_addr.

This commit is contained in:
Simon Kelley
2019-01-02 22:48:59 +00:00
parent ab194ed7ca
commit cc921df9ce
23 changed files with 336 additions and 335 deletions

View File

@@ -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));